Class StructuredRepresentation
- java.lang.Object
-
- it.unive.lisa.util.representation.StructuredRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<StructuredRepresentation>
- Direct Known Subclasses:
ListRepresentation,MapRepresentation,ObjectRepresentation,SetRepresentation,StringRepresentation
public abstract class StructuredRepresentation extends java.lang.Object implements java.lang.Comparable<StructuredRepresentation>
A structured representation of the information present in a single instance of an object. Instances of this class can be used to depict the content of an element in a domain-agnostic way, such as dumping the information to a file.
-
-
Constructor Summary
Constructors Constructor Description StructuredRepresentation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(StructuredRepresentation o)booleanequals(java.lang.Object obj)java.util.SortedMap<java.lang.String,java.lang.String>getProperties()Yields the set collection of textual properties defined for this representation.inthashCode()voidsetProperty(java.lang.String key, java.lang.String value)Sets a textual property to enrich the information represented by this instance.abstract SerializableValuetoSerializableValue()Produces a serializable version of this representation.abstract java.lang.StringtoString()
-
-
-
Method Detail
-
getProperties
public java.util.SortedMap<java.lang.String,java.lang.String> getProperties()
Yields the set collection of textual properties defined for this representation.- Returns:
- the properties
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)Sets a textual property to enrich the information represented by this instance.- Parameters:
key- the key of the propertyvalue- the value of the property
-
toSerializableValue
public abstract SerializableValue toSerializableValue()
Produces a serializable version of this representation.- Returns:
- an instance of
SerializableValuecontaining representing the same information as this representation
-
compareTo
public final int compareTo(StructuredRepresentation o)
- Specified by:
compareToin interfacejava.lang.Comparable<StructuredRepresentation>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-