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
ADomainRepresentation
in the form of a set of values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.SortedSet<DomainRepresentation>
elements
The 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 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
-
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.mapper
is 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: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
-
-