Class ListRepresentation
- java.lang.Object
-
- it.unive.lisa.analysis.representation.DomainRepresentation
-
- it.unive.lisa.analysis.representation.ListRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<DomainRepresentation>
public class ListRepresentation extends DomainRepresentation
ADomainRepresentation
in the form of a list of values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<DomainRepresentation>
elements
The elements of contained in this list.
-
Constructor Summary
Constructors Constructor Description ListRepresentation(DomainRepresentation... elements)
Builds a new representation containing the given elements.ListRepresentation(java.util.List<E> elements, java.util.function.Function<E,DomainRepresentation> mapper)
Builds a new representation starting from the given list.ListRepresentation(java.util.List<DomainRepresentation> elements)
Builds a new representation containing the given list.
-
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.List<DomainRepresentation> elements
The elements of contained in this list.
-
-
Constructor Detail
-
ListRepresentation
public ListRepresentation(java.util.List<E> elements, java.util.function.Function<E,DomainRepresentation> mapper)
Builds a new representation starting from the given list.mapper
is used for transforming each element in the list to its individual representation.- Type Parameters:
E
- the type of elements in the list- Parameters:
elements
- the list to representmapper
- the function that knows how to convert elements to their representation
-
ListRepresentation
public ListRepresentation(java.util.List<DomainRepresentation> elements)
Builds a new representation containing the given list.- Parameters:
elements
- the list
-
ListRepresentation
public ListRepresentation(DomainRepresentation... elements)
Builds a new representation containing the given elements.- Parameters:
elements
- the list
-
-
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
-
-