Package eu.woolplatform.utils.json
Class JsonAtomicToken
- java.lang.Object
-
- eu.woolplatform.utils.json.JsonObject
-
- eu.woolplatform.utils.json.JsonAtomicToken
-
public class JsonAtomicToken extends JsonObject
Atomic token in a JSON string.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonAtomicToken.TypeThe possible token types.
-
Constructor Summary
Constructors Constructor Description JsonAtomicToken()Constructs a new instance that still needs to be initialized.JsonAtomicToken(JsonAtomicToken.Type type)Constructs a new token with the specified type and value null.JsonAtomicToken(JsonAtomicToken.Type type, Object value)Constructs a new token with the specified type and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)JsonAtomicToken.TypegetType()Returns the type.ObjectgetValue()Returns the value.inthashCode()voidsetType(JsonAtomicToken.Type type)Sets the type.voidsetValue(Object value)Sets the value.-
Methods inherited from class eu.woolplatform.utils.json.JsonObject
toMap, toMap, toString, toString
-
-
-
-
Constructor Detail
-
JsonAtomicToken
public JsonAtomicToken()
Constructs a new instance that still needs to be initialized.
-
JsonAtomicToken
public JsonAtomicToken(JsonAtomicToken.Type type)
Constructs a new token with the specified type and value null.- Parameters:
type- the type
-
JsonAtomicToken
public JsonAtomicToken(JsonAtomicToken.Type type, Object value)
Constructs a new token with the specified type and value. The value depends on the type.- Parameters:
type- the typevalue- the value
-
-
Method Detail
-
getType
public JsonAtomicToken.Type getType()
Returns the type.- Returns:
- the type
-
setType
public void setType(JsonAtomicToken.Type type)
Sets the type.- Parameters:
type- the type
-
getValue
public Object getValue()
Returns the value. The value depends on the type and can be null.- Returns:
- the value or null
-
setValue
public void setValue(Object value)
Sets the value. The value depends on the type and can be null.- Parameters:
value- the value or null
-
hashCode
public int hashCode()
- Overrides:
hashCodein classJsonObject
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classJsonObject
-
-