Class PairRepresentation
- java.lang.Object
-
- it.unive.lisa.analysis.representation.DomainRepresentation
-
- it.unive.lisa.analysis.representation.PairRepresentation
-
- All Implemented Interfaces:
java.lang.Comparable<DomainRepresentation>
- Direct Known Subclasses:
InferredValue.InferredPairRepresentation
public class PairRepresentation extends DomainRepresentation
ADomainRepresentationin the form of a pair of elements.
-
-
Field Summary
Fields Modifier and Type Field Description protected DomainRepresentationleftThe left-most element.protected DomainRepresentationrightThe right-most element.
-
Constructor Summary
Constructors Constructor Description PairRepresentation(DomainRepresentation left, DomainRepresentation right)Builds a new representation containing the given pair of elements.PairRepresentation(L left, R right, java.util.function.Function<L,DomainRepresentation> leftMapper, java.util.function.Function<R,DomainRepresentation> rightMapper)Builds a new representation starting from the given pair of elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.analysis.representation.DomainRepresentation
compareTo
-
-
-
-
Field Detail
-
left
protected final DomainRepresentation left
The left-most element.
-
right
protected final DomainRepresentation right
The right-most element.
-
-
Constructor Detail
-
PairRepresentation
public PairRepresentation(L left, R right, java.util.function.Function<L,DomainRepresentation> leftMapper, java.util.function.Function<R,DomainRepresentation> rightMapper)Builds a new representation starting from the given pair of elements.leftMapperandrightMapperare used for transforming both elements to their individual representation.- Type Parameters:
L- the type of the left elementR- the type of the right element- Parameters:
left- the left element to representright- the right element to representleftMapper- the function that knows how to convert the left element to its representationrightMapper- the function that knows how to convert the right element to its representation
-
PairRepresentation
public PairRepresentation(DomainRepresentation left, DomainRepresentation right)
Builds a new representation containing the given pair of elements.- Parameters:
left- the left-most elementright- the right-most element
-
-
Method Detail
-
toString
public java.lang.String toString()
- Specified by:
toStringin classDomainRepresentation
-
hashCode
public int hashCode()
- Specified by:
hashCodein classDomainRepresentation
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classDomainRepresentation
-
-