Class SetRepresentation
- java.lang.Object
-
- it.unive.lisa.analysis.representation.DomainRepresentation
-
- it.unive.lisa.analysis.representation.SetRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<DomainRepresentation>
public class SetRepresentation extends DomainRepresentation
ADomainRepresentationin the form of a set of values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.SortedSet<DomainRepresentation>elementsThe elements of contained in this set.
-
Constructor Summary
Constructors Constructor Description SetRepresentation(java.util.Set<E> elements, java.util.function.Function<E,DomainRepresentation> mapper)Builds a new representation starting from the given set.SetRepresentation(java.util.Set<DomainRepresentation> elements)Builds a new representation containing the given set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()SerializableValuetoSerializableValue()Produces a serializable version of this representation.java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.analysis.representation.DomainRepresentation
compareTo, getProperties, setProperty
-
-
-
-
Field Detail
-
elements
protected final java.util.SortedSet<DomainRepresentation> elements
The elements of contained in this set.
-
-
Constructor Detail
-
SetRepresentation
public SetRepresentation(java.util.Set<E> elements, java.util.function.Function<E,DomainRepresentation> mapper)Builds a new representation starting from the given set.mapperis used for transforming each element in the set to its individual representation.- Type Parameters:
E- the type of elements in the set- Parameters:
elements- the set to representmapper- the function that knows how to convert elements to their representation
-
SetRepresentation
public SetRepresentation(java.util.Set<DomainRepresentation> elements)
Builds a new representation containing the given set.- Parameters:
elements- the set
-
-
Method Detail
-
toSerializableValue
public SerializableValue toSerializableValue()
Description copied from class:DomainRepresentationProduces a serializable version of this representation.- Specified by:
toSerializableValuein classDomainRepresentation- Returns:
- an instance of
SerializableValuecontaining representing the same information as this representation
-
toString
public java.lang.String toString()
- Specified by:
toStringin classDomainRepresentation
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDomainRepresentation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classDomainRepresentation
-
-