Package de.fraunhofer.iosb.ilt.sta.model
Class IdLong
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.sta.model.IdLong
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IdLong 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.
-
-
-
Field Detail
-
value
public Long value
-
-
Constructor Detail
-
IdLong
public IdLong()
-
IdLong
public IdLong(Long 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<IdLong>- Parameters:
gen- The JsonGenerator to write to.- Throws:
IOException- if the generator throws.
-
compareTo
public int compareTo(IdLong o)
- Specified by:
compareToin interfaceComparable<IdLong>
-
-