Class iicm.vrml.pwutils.CharArray
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class iicm.vrml.pwutils.CharArray
java.lang.Object
   |
   +----iicm.vrml.pwutils.CharArray
  -  public class CharArray
  -  extends Object
CharArray - dynamic array of char type values
better time and memory efficiency than Vector,
char[] accessible in native code
Copyright (c) 1996 IICM
   
  -   CharArray() CharArray()
-  create with default length
  
-   CharArray(char[]) CharArray(char[])
-  copy initial data from another char[].
  
-   CharArray(CharArray) CharArray(CharArray)
-  copy initial data from another CharArray (non-null).
  
-   CharArray(int) CharArray(int)
-  create with initial buffer length
   
  -   append(char) append(char)
-  append one char element
  
-   clearData() clearData()
-  clear the array
  
-   getCount() getCount()
-  get count of used array members.
  
-   getData() getData()
-  get data array.
  
-   setData(char[]) setData(char[])
-  copy data from a char[]
  
-   setData(char[], int) setData(char[], int)
-  copy first n elements of a char[]
  
-   setData(CharArray) setData(CharArray)
-  copy data from another CharArray
  
-   setSize(int) setSize(int)
-  set number of used array elements (ensures there is enough storage)
   
 CharArray
CharArray
  public CharArray()
  -  create with default length
 CharArray
CharArray
  public CharArray(int len)
  -  create with initial buffer length
 CharArray
CharArray
  public CharArray(char dat[])
  -  copy initial data from another char[]. To say it again:
values in char[] are *copied* and not just referenced by this class
 CharArray
CharArray
  public CharArray(CharArray dat)
  -  copy initial data from another CharArray (non-null).
do not use the above constructor in this case, as it would use all values,
not just the used length (count); again: values are *copied*
   
 setData
setData
  public void setData(CharArray dat)
  -  copy data from another CharArray
 setData
setData
  public void setData(char dat[])
  -  copy data from a char[]
 setData
setData
  public synchronized void setData(char dat[],
                                   int n)
  -  copy first n elements of a char[]
 getCount
getCount
  public final synchronized int getCount()
  -  get count of used array members.
Note: may be smaller than data_.length
 getData
getData
  public final synchronized char[] getData()
  -  get data array. Only elements 0 to (getCount () - 1) were set by user.
Subsequent calls (after enlargement) may return a different array object
 append
append
  public synchronized void append(char d)
  -  append one char element
 setSize
setSize
  public synchronized void setSize(int n)
  -  set number of used array elements (ensures there is enough storage)
 clearData
clearData
  public synchronized boolean clearData()
  -  clear the array
  
    -  Returns:
    
-  true if the array was previously non-empty
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index