Package proguard.analysis.cpa.defaults
Class StackAbstractState<AbstractSpaceT extends LatticeAbstractState<AbstractSpaceT>>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<E>
-
- java.util.Stack<AbstractSpaceT>
-
- proguard.analysis.cpa.defaults.StackAbstractState<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
,LatticeAbstractState<StackAbstractState<AbstractSpaceT>>
,AbstractState
public class StackAbstractState<AbstractSpaceT extends LatticeAbstractState<AbstractSpaceT>> extends java.util.Stack<AbstractSpaceT> implements LatticeAbstractState<StackAbstractState<AbstractSpaceT>>
ThisStackAbstractState
represents a stack ofLatticeAbstractState
s with the semilattice operators lifted to the stack.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StackAbstractState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackAbstractState<AbstractSpaceT>
copy()
Creates a copy of itself.boolean
isLessOrEqual(StackAbstractState<AbstractSpaceT> abstractState)
Compares itself to theabstractState
.StackAbstractState<AbstractSpaceT>
join(StackAbstractState<AbstractSpaceT> abstractState)
Computes a join over itself and theabstractState
.AbstractSpaceT
peek(int index)
Returns theindex
th element from the top of the stack.AbstractSpaceT
peekOrDefault(int index, AbstractSpaceT defaultState)
Returns theindex
th element from the top of the stack.AbstractSpaceT
popOrDefault(AbstractSpaceT defaultState)
Removes the top of the stack and returns it.-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, 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, getStateByName, hashCode
-
Methods inherited from interface proguard.analysis.cpa.defaults.LatticeAbstractState
isLess
-
-
-
-
Method Detail
-
join
public StackAbstractState<AbstractSpaceT> join(StackAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:LatticeAbstractState
Computes a join over itself and theabstractState
.- Specified by:
join
in interfaceLatticeAbstractState<AbstractSpaceT extends LatticeAbstractState<AbstractSpaceT>>
-
isLessOrEqual
public boolean isLessOrEqual(StackAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:LatticeAbstractState
Compares itself to theabstractState
.- Specified by:
isLessOrEqual
in interfaceLatticeAbstractState<AbstractSpaceT extends LatticeAbstractState<AbstractSpaceT>>
-
copy
public StackAbstractState<AbstractSpaceT> copy()
Description copied from interface:AbstractState
Creates a copy of itself.- Specified by:
copy
in interfaceAbstractState
-
popOrDefault
public AbstractSpaceT popOrDefault(AbstractSpaceT defaultState)
Removes the top of the stack and returns it. If the stack is empty, it returns thedefaultState
.
-
peek
public AbstractSpaceT peek(int index)
Returns theindex
th element from the top of the stack. If the stack does not have enough elements, it throws an exception.
-
peekOrDefault
public AbstractSpaceT peekOrDefault(int index, AbstractSpaceT defaultState)
Returns theindex
th element from the top of the stack. If the stack does not have enough elements, it returns thedefaultState
.
-
-