Top Description Fields Constructors Methods
org.hibernate.internal.util.collections

public final Class StandardStack<T>

extends Object
implements Stack<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.internal.util.collections.Stack
Type Parameters
<T>
The type of things stored in the stack
Imports
java.util.ArrayDeque, .Deque

A general-purpose stack impl supporting null values.
Authors
Steve Ebersole, Sanne Grinovero

Field Summary

Modifier and TypeField and Description
private ArrayDeque<E>
private static final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements org.hibernate.internal.util.collections.Stack.clear.

Remove all elements from the stack
private T
convert(final Object internalStoredObject)

public int
depth()

Implements org.hibernate.internal.util.collections.Stack.depth.

How many elements are currently on the stack?
public T
getCurrent()

Implements org.hibernate.internal.util.collections.Stack.getCurrent.

The element currently at the top of the stack
public boolean
isEmpty()

Implements org.hibernate.internal.util.collections.Stack.isEmpty.

Are there no elements currently in the stack?
public T
pop()

Implements org.hibernate.internal.util.collections.Stack.pop.

Pop (remove and return) the current element off the stack
public void
push(T newCurrent)

Implements org.hibernate.internal.util.collections.Stack.push.

Push the new element on the top of the stack
private Deque<E>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

internalStackback to summary
private ArrayDeque<E> internalStack
NULL_TOKENback to summary
private static final Object NULL_TOKEN

Constructor Detail

StandardStackback to summary
public StandardStack()

Method Detail

clearback to summary
public void clear()

Implements org.hibernate.internal.util.collections.Stack.clear.

Doc from org.hibernate.internal.util.collections.Stack.clear.

Remove all elements from the stack

Annotations
@Override
convertback to summary
private T convert(final Object internalStoredObject)
depthback to summary
public int depth()

Implements org.hibernate.internal.util.collections.Stack.depth.

Doc from org.hibernate.internal.util.collections.Stack.depth.

How many elements are currently on the stack?

Annotations
@Override
getCurrentback to summary
public T getCurrent()

Implements org.hibernate.internal.util.collections.Stack.getCurrent.

Doc from org.hibernate.internal.util.collections.Stack.getCurrent.

The element currently at the top of the stack

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements org.hibernate.internal.util.collections.Stack.isEmpty.

Doc from org.hibernate.internal.util.collections.Stack.isEmpty.

Are there no elements currently in the stack?

Annotations
@Override
popback to summary
public T pop()

Implements org.hibernate.internal.util.collections.Stack.pop.

Doc from org.hibernate.internal.util.collections.Stack.pop.

Pop (remove and return) the current element off the stack

Annotations
@Override
pushback to summary
public void push(T newCurrent)

Implements org.hibernate.internal.util.collections.Stack.push.

Doc from org.hibernate.internal.util.collections.Stack.push.

Push the new element on the top of the stack

Annotations
@Override
stackInstanceExpectedback to summary
private Deque<E> stackInstanceExpected()