GlueGen: com.jogamp.common.util.PrimitiveStack Interface Reference

GlueGen v2.6.0-rc-20250822 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | List of all members
com.jogamp.common.util.PrimitiveStack Interface Reference

Simple primitive-type stack. More...

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

## Public Member Functions

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.

Definition at line 33 of file PrimitiveStack.java.

## Member Function Documentation

## ◆ capacity()

int com.jogamp.common.util.PrimitiveStack.capacity | ( |  | ) |

Returns this stack's current capacity.

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

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

## ◆ getGrowSize()

int com.jogamp.common.util.PrimitiveStack.getGrowSize | ( |  | ) |

Returns the grow size.

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

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

## ◆ position() [1/2]

int com.jogamp.common.util.PrimitiveStack.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.

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

## ◆ position() [2/2]

void com.jogamp.common.util.PrimitiveStack.position | ( | int | newPosition | ) | throws IndexOutOfBoundsException

Sets the position of this stack.

Parameters

  newPosition | the new position

Exceptions

  IndexOutOfBoundsException | if `newPosition` is outside of range: 0 ≤ position < `capacity()`.

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

## ◆ remaining()

int com.jogamp.common.util.PrimitiveStack.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()

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

## ◆ setGrowSize()

void com.jogamp.common.util.PrimitiveStack.setGrowSize | ( | int | newGrowSize | ) |

Set new `growSize().`

Implemented in com.jogamp.common.util.IntegerStack, and com.jogamp.common.util.FloatStack.

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

- src/java/com/jogamp/common/util/PrimitiveStack.java