GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.util.FloatStack Class Reference

Simple primitive-type stack. More...

Inheritance diagram for com.jogamp.common.util.FloatStack:
Collaboration diagram for com.jogamp.common.util.FloatStack:

Public Member Functions

 FloatStack (final int initialSize, final int growSize)
 
final int capacity ()
 Returns this stack's current capacity. More...
 
final int position ()
 Returns the current position of this stack. More...
 
final void position (final int newPosition) throws IndexOutOfBoundsException
 Sets the position of this stack. More...
 
final int remaining ()
 Returns the remaining elements left before stack will grow about getGrowSize(). More...
 
final int getGrowSize ()
 Returns the grow size. More...
 
final void setGrowSize (final int newGrowSize)
 Set new growSize(). More...
 
final String toString ()
 
final float[] buffer ()
 
final float[] putOnTop (final float[] src, final int srcOffset, final int length) throws IndexOutOfBoundsException
 FILO put operation. More...
 
final FloatBuffer putOnTop (final FloatBuffer src, final int length) throws IndexOutOfBoundsException, BufferUnderflowException
 FILO put operation. More...
 
final float[] getFromTop (final float[] dest, final int destOffset, final int length) throws IndexOutOfBoundsException
 FILO get operation. More...
 
final FloatBuffer getFromTop (final FloatBuffer dest, final int length) throws IndexOutOfBoundsException, BufferOverflowException
 FILO get operation. More...
 
int capacity ()
 Returns this stack's current capacity. More...
 
int position ()
 Returns the current position of this stack. More...
 
void position (int newPosition) throws IndexOutOfBoundsException
 Sets the position of this stack. More...
 
int remaining ()
 Returns the remaining elements left before stack will grow about getGrowSize(). More...
 
int getGrowSize ()
 Returns the grow size. More...
 
void setGrowSize (int newGrowSize)
 Set new growSize(). More...
 

Detailed Description

Simple primitive-type stack.

Implemented operations:

  • FILO - First In, Last Out

Definition at line 43 of file FloatStack.java.

Constructor & Destructor Documentation

◆ FloatStack()

com.jogamp.common.util.FloatStack.FloatStack ( final int  initialSize,
final int  growSize 
)
Parameters
initialSizeinitial size, must be > zero
growSizegrow size if position() is reached, maybe 0 in which case an IndexOutOfBoundsException is thrown.

Definition at line 53 of file FloatStack.java.

Member Function Documentation

◆ buffer()

final float[] com.jogamp.common.util.FloatStack.buffer ( )

Definition at line 87 of file FloatStack.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ capacity()

final int com.jogamp.common.util.FloatStack.capacity ( )

Returns this stack's current capacity.

The capacity may grow with a put operation w/ insufficient remaining() elements left, if getGrowSize() > 0.

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 60 of file FloatStack.java.

◆ getFromTop() [1/2]

final float[] com.jogamp.common.util.FloatStack.getFromTop ( final float[]  dest,
final int  destOffset,
final int  length 
) throws IndexOutOfBoundsException

FILO get operation.

Parameters
destdestination buffer
destOffsetoffset of dest
lengthnumber of float elements to get from-top this stack to dest.
Returns
the dest float[]
Exceptions
IndexOutOfBoundsExceptionif stack or dest has less elements than length.

Definition at line 145 of file FloatStack.java.

◆ getFromTop() [2/2]

final FloatBuffer com.jogamp.common.util.FloatStack.getFromTop ( final FloatBuffer  dest,
final int  length 
) throws IndexOutOfBoundsException, BufferOverflowException

FILO get operation.

Parameters
destdestination buffer, it's position is incremented by length.
lengthnumber of float elements to get from-top this stack to dest.
Returns
the dest FloatBuffer
Exceptions
IndexOutOfBoundsExceptionif stack has less elements than length
BufferOverflowExceptionif src FloatBuffer has less remaining elements than length.

Definition at line 161 of file FloatStack.java.

◆ getGrowSize()

final int com.jogamp.common.util.FloatStack.getGrowSize ( )

Returns the grow size.

A stack grows by this size in case a put operation exceeds it's capacity().

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 77 of file FloatStack.java.

◆ position() [1/2]

final int com.jogamp.common.util.FloatStack.position ( )

Returns the current position of this stack.

Position is in the range: 0 ≤ position < capacity().

The position equals to the number of elements stored.

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 63 of file FloatStack.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ position() [2/2]

final void com.jogamp.common.util.FloatStack.position ( final int  newPosition) throws IndexOutOfBoundsException

Sets the position of this stack.

Parameters
newPositionthe new position
Exceptions
IndexOutOfBoundsExceptionif newPosition is outside of range: 0 ≤ position < capacity().

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 66 of file FloatStack.java.

Here is the call graph for this function:

◆ putOnTop() [1/2]

final float[] com.jogamp.common.util.FloatStack.putOnTop ( final float[]  src,
final int  srcOffset,
final int  length 
) throws IndexOutOfBoundsException

FILO put operation.

Parameters
srcsource buffer
srcOffsetoffset of src
lengthnumber of float elements to put from src on-top this stack
Returns
the src float[]
Exceptions
IndexOutOfBoundsExceptionif stack cannot grow due to zero grow-size or offset+length exceeds src.

Definition at line 111 of file FloatStack.java.

◆ putOnTop() [2/2]

final FloatBuffer com.jogamp.common.util.FloatStack.putOnTop ( final FloatBuffer  src,
final int  length 
) throws IndexOutOfBoundsException, BufferUnderflowException

FILO put operation.

Parameters
srcsource buffer, it's position is incremented by length
lengthnumber of float elements to put from src on-top this stack
Returns
the src FloatBuffer
Exceptions
IndexOutOfBoundsExceptionif stack cannot grow due to zero grow-size
BufferUnderflowExceptionif src FloatBuffer has less remaining elements than length.

Definition at line 128 of file FloatStack.java.

◆ remaining()

final int com.jogamp.common.util.FloatStack.remaining ( )

Returns the remaining elements left before stack will grow about getGrowSize().

  remaining := capacity() - position();

<p<blockquote>‍

0 denotes a full stack.

See also
capacity()
#position()

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 74 of file FloatStack.java.

Here is the caller graph for this function:

◆ setGrowSize()

final void com.jogamp.common.util.FloatStack.setGrowSize ( final int  newGrowSize)

Set new growSize().

Implements com.jogamp.common.util.PrimitiveStack.

Definition at line 80 of file FloatStack.java.

◆ toString()

final String com.jogamp.common.util.FloatStack.toString ( )

Definition at line 83 of file FloatStack.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: