public class PreflightPath
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Stack<java.lang.Class> |
classObjPath |
private java.util.Stack |
objectPath |
Constructor and Description |
---|
PreflightPath() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
<T> T |
getClosestPathElement(java.lang.Class<T> type) |
<T> int |
getClosestTypePosition(java.lang.Class<T> type)
Return the index of the first object that have the given type.
|
<T> T |
getPathElement(int position,
java.lang.Class<T> expectedType)
Return the object at the given position.
|
boolean |
isEmpty() |
boolean |
isExpectedType(java.lang.Class<?> type) |
java.lang.Object |
peek()
Looks at the object at the top of this stack without removing it from the stack.
|
java.lang.Object |
pop() |
boolean |
pushObject(java.lang.Object pathElement) |
int |
size() |
private final java.util.Stack objectPath
private final java.util.Stack<java.lang.Class> classObjPath
public boolean pushObject(java.lang.Object pathElement)
public <T> T getPathElement(int position, java.lang.Class<T> expectedType)
position
- expectedType
- public <T> int getClosestTypePosition(java.lang.Class<T> type)
type
- public <T> T getClosestPathElement(java.lang.Class<T> type)
public java.lang.Object peek()
public java.lang.Object pop()
public void clear()
public int size()
public boolean isEmpty()
public boolean isExpectedType(java.lang.Class<?> type)