Class StringRepresentation
- java.lang.Object
-
- it.unive.lisa.util.representation.StructuredRepresentation
-
- it.unive.lisa.util.representation.StringRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<StructuredRepresentation>
public class StringRepresentation extends StructuredRepresentation
AStructuredRepresentation
in the form of a single string element.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
representation
The textual representation.
-
Constructor Summary
Constructors Constructor Description StringRepresentation(java.lang.Object obj)
Builds a new representation starting from the given object.StringRepresentation(java.lang.String representation)
Builds a new representation containing the given string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
SerializableValue
toSerializableValue()
Produces a serializable version of this representation.java.lang.String
toString()
-
Methods inherited from class it.unive.lisa.util.representation.StructuredRepresentation
compareTo, getProperties, setProperty
-
-
-
-
Constructor Detail
-
StringRepresentation
public StringRepresentation(java.lang.String representation)
Builds a new representation containing the given string.- Parameters:
representation
- the string
-
StringRepresentation
public StringRepresentation(java.lang.Object obj)
Builds a new representation starting from the given object.String.valueOf(Object)
is used to extract its string representation.- Parameters:
obj
- the object
-
-
Method Detail
-
toSerializableValue
public SerializableValue toSerializableValue()
Description copied from class:StructuredRepresentation
Produces a serializable version of this representation.- Specified by:
toSerializableValue
in classStructuredRepresentation
- Returns:
- an instance of
SerializableValue
containing representing the same information as this representation
-
toString
public java.lang.String toString()
- Specified by:
toString
in classStructuredRepresentation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classStructuredRepresentation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classStructuredRepresentation
-
-