Package lazyj
Class Format.JSONFragment
java.lang.Object
lazyj.Format.JSONFragment
- All Implemented Interfaces:
CharSequence
- Enclosing class:
- Format
- Since:
- 2019-10-08
- Author:
- costing
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorJSONFragment(CharSequence toCopy) Copying another char sequence to this object, assuming that the content is a valid JSON fragment. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(char c) Append a single charappend(CharSequence seq) charcharAt(int index) inthashCode()intlength()subSequence(int start, int end) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
JSONFragment
public JSONFragment()Empty constructor -
JSONFragment
Copying another char sequence to this object, assuming that the content is a valid JSON fragment. No checks are done on the validity of the content.- Parameters:
toCopy-
-
-
Method Details
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
hashCode
public int hashCode() -
append
public void append(char c) Append a single char- Parameters:
c-
-
append
- Parameters:
seq-- Returns:
- the same object, to continue appending to if needed
-