de.jreality.scene.data
Class StringArray

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by de.jreality.scene.data.DataItem
              extended by de.jreality.scene.data.DataList
                  extended by de.jreality.scene.data.StringArray
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List

public class StringArray
extends DataList

An immutable array. A good JIT compiler optimizes this such that access it is not slower as for the pure array. The advantage is, that only the creator who provided the array is allowed to change it.

Version:
1.0
Author:
weissman
See Also:
Serialized Form

Constructor Summary
StringArray(java.lang.String[] data)
           
StringArray(java.lang.String[] data, int offset, int length)
           
 
Method Summary
 int getLength()
           
 java.lang.String getValueAt(int n)
           
 StringArray toStringArray()
           
 java.lang.String[] toStringArray(java.lang.String[] target)
           
 
Methods inherited from class de.jreality.scene.data.DataList
get, getStorageModel, item, readOnlyList, size, toDoubleArray, toDoubleArrayArray, toIntArray, toIntArrayArray, toString
 
Methods inherited from class de.jreality.scene.data.DataItem
copyTo, copyTo, printUsage, toDoubleArray, toDoubleArrayArray, toIntArray, toIntArrayArray, toStringArrayArray, toStringArrayArray
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

StringArray

public StringArray(java.lang.String[] data)

StringArray

public StringArray(java.lang.String[] data,
                   int offset,
                   int length)
Method Detail

toStringArray

public StringArray toStringArray()
Overrides:
toStringArray in class DataItem

toStringArray

public final java.lang.String[] toStringArray(java.lang.String[] target)
Overrides:
toStringArray in class DataItem

getValueAt

public final java.lang.String getValueAt(int n)

getLength

public final int getLength()