Class IdString
java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.model.IdString
- All Implemented Interfaces:
Id<IdString>,Comparable<IdString>
An Id implementation using String values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetJson()Get the value, formatted for inserting into a JSON document.getUrl()Get the value, formatted for use in a url.getValue()Get the raw value of this Id.inthashCode()toString()voidwriteTo(com.fasterxml.jackson.core.JsonGenerator gen) Write the value to the given JsonGenerator.
-
Constructor Details
-
IdString
public IdString() -
IdString
-
-
Method Details
-
getValue
Description copied from interface:IdGet the raw value of this Id. -
getUrl
Description copied from interface:IdGet the value, formatted for use in a url. String values will be quoted with single quotes. -
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
Description 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.
-
hashCode
public int hashCode() -
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<IdString>
-