Top Description Fields Constructors Methods
org.apache.pdfbox.preflight

public Class PreflightPath

extends Object
Class Inheritance
Imports
java.util.Stack

Contains a stack of objects to follow the validation path. Examples:

Field Summary

Modifier and TypeField and Description
private final Stack<Class<T>>
private final Stack<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public <T> T
public <T> int

Returns:

the object position, -1 if the type doesn't exist in the stack.
getClosestTypePosition
(Class<T> type)

Return the index of the first object that have the given type.

public <T> T

Returns:

the object at the given position.
getPathElement
(int position, Class<T> expectedType)

Return the object at the given position.

public boolean
public boolean
public Object

Returns:

the object at the top of the stack.
peek
()

Looks at the object at the top of this stack without removing it from the stack.

public Object
pop()

public boolean
pushObject(Object pathElement)

public int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classObjPathback to summary
private final Stack<Class<T>> classObjPath
Annotations
@SuppressWarnings:rawtypes
objectPathback to summary
private final Stack<E> objectPath
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

PreflightPathback to summary
public PreflightPath()

Method Detail

clearback to summary
public void clear()
getClosestPathElementback to summary
public <T> T getClosestPathElement(Class<T> type)
getClosestTypePositionback to summary
public <T> int getClosestTypePosition(Class<T> type)

Return the index of the first object that have the given type.

Returns:int

the object position, -1 if the type doesn't exist in the stack.

getPathElementback to summary
public <T> T getPathElement(int position, Class<T> expectedType)

Return the object at the given position. The object must be an instance of the given class.

Returns:T

the object at the given position.

Annotations
@SuppressWarnings:unchecked
isEmptyback to summary
public boolean isEmpty()
isExpectedTypeback to summary
public boolean isExpectedType(Class<?> type)
peekback to summary
public Object peek()

Looks at the object at the top of this stack without removing it from the stack.

Returns:Object

the object at the top of the stack.

popback to summary
public Object pop()
pushObjectback to summary
public boolean pushObject(Object pathElement)
Annotations
@SuppressWarnings:unchecked
sizeback to summary
public int size()