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 int
compareTo(IdString o)
boolean
equals(Object obj)
String
getJson()
Get the value, formatted for inserting into a JSON document.String
getUrl()
Get the value, formatted for use in a url.Object
getValue()
Get the raw value of this Id.int
hashCode()
String
toString()
void
writeTo(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:Id
Get the raw value of this Id.
-
getUrl
public String getUrl()
Description copied from interface:Id
Get the value, formatted for use in a url. String values will be quoted with single quotes.
-
getJson
public String getJson()
Description copied from interface:Id
Get 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 IOException
Description copied from interface:Id
Write the value to the given JsonGenerator.- Specified by:
writeTo
in interfaceId<IdString>
- Parameters:
gen
- The JsonGenerator to write to.- Throws:
IOException
- if the generator throws.
-
compareTo
public int compareTo(IdString o)
- Specified by:
compareTo
in interfaceComparable<IdString>
-
-