Package lazyj
Class Format.JSONFragment
java.lang.Object
lazyj.Format.JSONFragment
- All Implemented Interfaces:
java.lang.CharSequence
- Enclosing class:
- Format
public static class Format.JSONFragment
extends java.lang.Object
implements java.lang.CharSequence
- Since:
- 2019-10-08
- Author:
- costing
-
Constructor Summary
Constructors Constructor Description JSONFragment()
Empty constructorJSONFragment(java.lang.CharSequence toCopy)
Copying another char sequence to this object, assuming that the content is a valid JSON fragment. -
Method Summary
Modifier and Type Method Description void
append(char c)
Append a single charFormat.JSONFragment
append(java.lang.CharSequence seq)
char
charAt(int index)
int
hashCode()
int
length()
java.lang.CharSequence
subSequence(int start, int end)
java.lang.String
toString()
-
Constructor Details
-
JSONFragment
public JSONFragment()Empty constructor -
JSONFragment
public JSONFragment(java.lang.CharSequence toCopy)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:
length
in interfacejava.lang.CharSequence
-
charAt
public char charAt(int index)- Specified by:
charAt
in interfacejava.lang.CharSequence
-
subSequence
public java.lang.CharSequence subSequence(int start, int end)- Specified by:
subSequence
in interfacejava.lang.CharSequence
-
toString
public java.lang.String toString()- Specified by:
toString
in interfacejava.lang.CharSequence
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
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
-