Class ObjectRepresentation
- java.lang.Object
-
- it.unive.lisa.analysis.representation.DomainRepresentation
-
- it.unive.lisa.analysis.representation.ObjectRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<DomainRepresentation>
public class ObjectRepresentation extends DomainRepresentation
ADomainRepresentation
in the form of a complex object with fields.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.SortedMap<java.lang.String,DomainRepresentation>
fields
The fields of this object, with their values.
-
Constructor Summary
Constructors Constructor Description ObjectRepresentation(java.util.Map<java.lang.String,DomainRepresentation> map)
Builds a new representation containing the given map.ObjectRepresentation(java.util.Map<java.lang.String,V> fields, java.util.function.Function<V,DomainRepresentation> mapper)
Builds a new representation starting from the given map.
-
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.analysis.representation.DomainRepresentation
compareTo, getProperties, setProperty
-
-
-
-
Field Detail
-
fields
protected final java.util.SortedMap<java.lang.String,DomainRepresentation> fields
The fields of this object, with their values.
-
-
Constructor Detail
-
ObjectRepresentation
public ObjectRepresentation(java.util.Map<java.lang.String,V> fields, java.util.function.Function<V,DomainRepresentation> mapper)
Builds a new representation starting from the given map.mapper
is used for transforming each value in the map to its individual representation.- Type Parameters:
V
- the type of values in the map- Parameters:
fields
- the map to representmapper
- the function that knows how to convert values to their representation
-
ObjectRepresentation
public ObjectRepresentation(java.util.Map<java.lang.String,DomainRepresentation> map)
Builds a new representation containing the given map.- Parameters:
map
- the map
-
-
Method Detail
-
toSerializableValue
public SerializableValue toSerializableValue()
Description copied from class:DomainRepresentation
Produces a serializable version of this representation.- Specified by:
toSerializableValue
in classDomainRepresentation
- Returns:
- an instance of
SerializableValue
containing representing the same information as this representation
-
toString
public java.lang.String toString()
- Specified by:
toString
in classDomainRepresentation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDomainRepresentation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classDomainRepresentation
-
-