Package de.fraunhofer.iosb.ilt.sta.model
Class IdString
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.sta.model.IdString
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IdString o)booleanequals(Object obj)StringgetJson()Get the value, formatted for inserting into a JSON document.StringgetUrl()Get the value, formatted for use in a url.ObjectgetValue()Get the raw value of this Id.inthashCode()StringtoString()voidwriteTo(com.fasterxml.jackson.core.JsonGenerator gen)Write the value to the given JsonGenerator.
-
-
-
Constructor Detail
-
IdString
public IdString()
-
IdString
public IdString(String value)
-
-
Method Detail
-
getValue
public Object getValue()
Description copied from interface:IdGet the raw value of this Id.
-
getUrl
public String getUrl()
Description copied from interface:IdGet the value, formatted for use in a url. String values will be quoted with single quotes.
-
getJson
public String getJson()
Description copied from interface:IdGet the value, formatted for inserting into a JSON document. In general, it is better to use a json mapper, and pass it the Object returned by getValue().
-
writeTo
public void writeTo(com.fasterxml.jackson.core.JsonGenerator gen) throws IOExceptionDescription copied from interface:IdWrite the value to the given JsonGenerator.- Specified by:
writeToin interfaceId<IdString>- Parameters:
gen- The JsonGenerator to write to.- Throws:
IOException- if the generator throws.
-
compareTo
public int compareTo(IdString o)
- Specified by:
compareToin interfaceComparable<IdString>
-
-