Package proguard.analysis.cpa.defaults
Class ListAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<AbstractSpaceT>
-
- proguard.analysis.cpa.defaults.ListAbstractState<AbstractSpaceT>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<AbstractSpaceT>
,java.util.Collection<AbstractSpaceT>
,java.util.List<AbstractSpaceT>
,java.util.RandomAccess
,AbstractState<ListAbstractState<AbstractSpaceT>>
public class ListAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>> extends java.util.ArrayList<AbstractSpaceT> implements AbstractState<ListAbstractState<AbstractSpaceT>>
ThisListAbstractState
represents a list ofAbstractState
s with the semilattice operators lifted to the list.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ListAbstractState()
Create a list abstract state with initial capacity 0.ListAbstractState(int initalCapacity)
Create a list abstract state with selected initial capacity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListAbstractState<AbstractSpaceT>
copy()
Creates a copy of itself.AbstractSpaceT
getOrDefault(int index, AbstractSpaceT defaultState)
Returns the abstract state atindex
, if present, returns thedefaultState
otherwise.boolean
isLessOrEqual(ListAbstractState<AbstractSpaceT> abstractState)
Compares itself to theabstractState
(i.e., compare the states on the partial order provided by the domain of the analysis).ListAbstractState<AbstractSpaceT>
join(ListAbstractState<AbstractSpaceT> abstractState)
Computes a join over itself and another abstract stateabstractState
(i.e., finds the least upper bound on the semilattice).AbstractSpaceT
set(int index, AbstractSpaceT element, AbstractSpaceT defaultState)
Sets an element atindex
toelem
.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
equals, getPrecision, hashCode, isLess
-
-
-
-
Method Detail
-
join
public ListAbstractState<AbstractSpaceT> join(ListAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:AbstractState
Computes a join over itself and another abstract stateabstractState
(i.e., finds the least upper bound on the semilattice).- Specified by:
join
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
isLessOrEqual
public boolean isLessOrEqual(ListAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:AbstractState
Compares itself to theabstractState
(i.e., compare the states on the partial order provided by the domain of the analysis).- Specified by:
isLessOrEqual
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
copy
public ListAbstractState<AbstractSpaceT> copy()
Description copied from interface:AbstractState
Creates a copy of itself.- Specified by:
copy
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
getOrDefault
public AbstractSpaceT getOrDefault(int index, AbstractSpaceT defaultState)
Returns the abstract state atindex
, if present, returns thedefaultState
otherwise.
-
set
public AbstractSpaceT set(int index, AbstractSpaceT element, AbstractSpaceT defaultState)
Sets an element atindex
toelem
. Extends its length and pads withdefaultState
, if necessary.
-
-