com.sun.j3d.utils.geometry.compression
Class GeneralizedStrip.IntList

java.lang.Object
  extended by com.sun.j3d.utils.geometry.compression.GeneralizedStrip.IntList
Enclosing class:
GeneralizedStrip

static class GeneralizedStrip.IntList
extends java.lang.Object

The IntList is like an ArrayList, but avoids the Integer object wrapper and accessor overhead for simple lists of ints.


Field Summary
(package private)  int count
          The number of ints in this instance.
(package private)  int[] ints
          The array of ints.
 
Constructor Summary
GeneralizedStrip.IntList(int initialSize)
          Construct a new empty IntList of the given initial size.
GeneralizedStrip.IntList(int[] ints)
          Constructs an IntList with the given contents.
 
Method Summary
(package private)  void add(int i)
          Add a new int to the end of this list.
(package private)  void fillAscending()
          Fill the list with consecutive integers starting from 0.
 java.lang.String toString()
           
(package private)  int[] trim()
          Trim the backing array to the current count and return the resulting backing array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ints

int[] ints
The array of ints.


count

int count
The number of ints in this instance.

Constructor Detail

GeneralizedStrip.IntList

GeneralizedStrip.IntList(int initialSize)
Construct a new empty IntList of the given initial size.

Parameters:
initialSize - initial size of the backing array

GeneralizedStrip.IntList

GeneralizedStrip.IntList(int[] ints)
Constructs an IntList with the given contents.

Parameters:
ints - the array of ints to use as the contents
Method Detail

add

void add(int i)
Add a new int to the end of this list.

Parameters:
i - the int to be appended to this list

trim

int[] trim()
Trim the backing array to the current count and return the resulting backing array.


fillAscending

void fillAscending()
Fill the list with consecutive integers starting from 0.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.