public class CLElement implements Cloneable

Known direct subclasses
CLContainer
CLNumber
CLString

CLElement implementation for json Strings when used as property values or array elements.

CLToken
Known indirect subclasses

Base element to represent a piece of parsed Json.

Summary

Protected fields

CLContainer
long
long
static int
static int

Public constructors

CLElement(char[] content)

Public methods

@NonNull CLElement
String
boolean
CLElement
long

The character index this element was ended on

float
int
int

get the line Number

long

The character index this element was started on

boolean

Whether this element has any valid content defined.

int
boolean
boolean
boolean
void
void
setEnd(long end)
void
setLine(int line)
void
setStart(long start)
String

Protected methods

void
addIndent(StringBuilder builder, int indent)
String
String
String
toFormattedJSON(int indent, int forceIndent)
String

Protected fields

mContainer

Added in 1.1.0
protected CLContainer mContainer

mEnd

Added in 1.1.0
protected long mEnd

mStart

Added in 1.1.0
protected long mStart

sBaseIndent

Added in 1.1.0
protected static int sBaseIndent

sMaxLine

Added in 1.1.0
protected static int sMaxLine

Public constructors

CLElement

Added in 1.1.0
public CLElement(char[] content)

Public methods

clone

Added in 1.1.0
public @NonNull CLElement clone()

content

Added in 1.1.0
public String content()

equals

public boolean equals(Object o)

getContainer

Added in 1.1.0
public CLElement getContainer()

getEnd

Added in 1.1.0
public long getEnd()

The character index this element was ended on

getFloat

Added in 1.1.0
public float getFloat()

getInt

Added in 1.1.0
public int getInt()

getLine

Added in 1.1.0
public int getLine()

get the line Number

Returns
int

return the line number this element was on

getStart

Added in 1.1.0
public long getStart()

The character index this element was started on

hasContent

Added in 1.1.0
public boolean hasContent()

Whether this element has any valid content defined.

The content is valid when content can be called without causing exceptions.

hashCode

public int hashCode()

isDone

Added in 1.1.0
public boolean isDone()

isStarted

Added in 1.1.0
public boolean isStarted()

notStarted

Added in 1.1.0
public boolean notStarted()

setContainer

Added in 1.1.0
public void setContainer(CLContainer element)

setEnd

Added in 1.1.0
public void setEnd(long end)

setLine

Added in 1.1.0
public void setLine(int line)

setStart

Added in 1.1.0
public void setStart(long start)

toString

public String toString()

Protected methods

addIndent

Added in 1.1.0
protected void addIndent(StringBuilder builder, int indent)

getDebugName

Added in 1.1.0
protected String getDebugName()

getStrClass

Added in 1.1.0
protected String getStrClass()

toFormattedJSON

Added in 1.1.0
protected String toFormattedJSON(int indent, int forceIndent)

toJSON

Added in 1.1.0
protected String toJSON()