tip.cfg.dfa
Class IntervalAnalysis.Interval
java.lang.Object
tip.cfg.dfa.IntervalAnalysis.Interval
- All Implemented Interfaces:
- Lattice<IntervalAnalysis.Interval>, Equalitor<IntervalAnalysis.Interval>
- Enclosing class:
- IntervalAnalysis
public static class IntervalAnalysis.Interval
- extends Object
- implements Lattice<IntervalAnalysis.Interval>
l
public Integer l
h
public Integer h
IntervalAnalysis.Interval
public IntervalAnalysis.Interval()
IntervalAnalysis.Interval
public IntervalAnalysis.Interval(Integer _left,
Integer _right)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
getSmallestElement
public IntervalAnalysis.Interval getSmallestElement()
- Description copied from interface:
Lattice
- Returns the smallest element of the lattice. Beware that if the lattice
elements are mutable,
getSmallestElement
must return a cloned
element.
- Specified by:
getSmallestElement
in interface Lattice<IntervalAnalysis.Interval>
- Returns:
- the smallest element of the lattice
getLeastUpperBound
public IntervalAnalysis.Interval getLeastUpperBound(IntervalAnalysis.Interval a,
IntervalAnalysis.Interval b)
- Description copied from interface:
Lattice
- Returns the least upper bound of the lattice elements
a
and
b
. Beware that if the lattice elements are mutable, getLeastUpperBound
must return a cloned or new element. The method must
handle the case where a
or b
are null
.
- Specified by:
getLeastUpperBound
in interface Lattice<IntervalAnalysis.Interval>
- Parameters:
a
- the first elementb
- the second element
- Returns:
- the least upper bound of the first and second element
equals
public boolean equals(IntervalAnalysis.Interval a,
IntervalAnalysis.Interval b)
- Description copied from interface:
Equalitor
- Returns
true
if the elements a
and b
are equal
according to this {link Equalitor}. If the elements are equal, then
we must have hashCode(a) == hashCode(b)
. The method must handle
the case where a
or b
is null
.
The equality relation must atleast be reflexive in the object reference,
i.e. for all elements e
we must have equals(e,e)==true
.
- Specified by:
equals
in interface Equalitor<IntervalAnalysis.Interval>
- Parameters:
a
- the first elementb
- the second element
- Returns:
true
if a
and b
are equal
hashCode
public int hashCode(IntervalAnalysis.Interval a)
- Description copied from interface:
Equalitor
- Returns the hashcode for the element
a
according to this
Equalitor
. If Equalitor.equals(Object,Object)
returns
true
, for two elements a
and b
, then for
hashCode
we must have hashCode(a) == hashCode(b)
.
The method must handle the case where a
is null
.
- Specified by:
hashCode
in interface Equalitor<IntervalAnalysis.Interval>
- Parameters:
a
- the element
- Returns:
- the hashcode of
a
.