crystalspace.jbind.impl.csutil.stringarray
Class csStringArray

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.stringarray.csStringArray
All Implemented Interfaces:
iBase, iPointer, iStringArray

public class csStringArray
extends csBase
implements iStringArray

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csStringArray(iPointer nPointer)
           
 
Method Summary
 void deleteAll()
          Delete all strings in array.
 boolean deleteIndex(int n)
          Delete Nth string in the array.
 int find(java.lang.String value)
          Find a string, case-sensitive.
 int findCaseInsensitive(java.lang.String value)
          Find a string, case-insensitive.
 int findSortedKey(java.lang.String value)
          Find index of a string in a pre-sorted string array.
 java.lang.String get(int n)
          Get Nth string in vector.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
 boolean insert(int n, java.lang.String value)
          Insert a string before Nth string in the array.
protected  boolean isNativePointerValidSafe(long pointer)
           
 int length()
          Query array length.
 java.lang.String pop()
          Pop a string from the top of stack.
 void push(java.lang.String value)
          Push a string onto the stack.
 void sort()
          Sort the string array.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csStringArray

public csStringArray(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

deleteAll

public void deleteAll()
Description copied from interface: iStringArray
Delete all strings in array. Implemented in scfStringArray.

Specified by:
deleteAll in interface iStringArray
See Also:
iStringArray.deleteAll()

deleteIndex

public boolean deleteIndex(int n)
Description copied from interface: iStringArray
Delete Nth string in the array. Implemented in scfStringArray.

Specified by:
deleteIndex in interface iStringArray
Parameters:
n -
Returns:
See Also:
iStringArray.deleteIndex(int)

find

public int find(java.lang.String value)
Description copied from interface: iStringArray
Find a string, case-sensitive. Returns -1 if not found, else item index. Works with unsorted arrays. For sorted arrays, FindSortedKey(); is faster. Implemented in scfStringArray.

Specified by:
find in interface iStringArray
Parameters:
value -
Returns:
See Also:
iStringArray.find(java.lang.String)

findCaseInsensitive

public int findCaseInsensitive(java.lang.String value)
Description copied from interface: iStringArray
Find a string, case-insensitive. Returns -1 if not found, else item index. Works with unsorted arrays. For sorted arrays, FindSortedKey(); is faster. Implemented in scfStringArray.

Specified by:
findCaseInsensitive in interface iStringArray
Parameters:
value -
Returns:
See Also:
iStringArray.findCaseInsensitive(java.lang.String)

findSortedKey

public int findSortedKey(java.lang.String value)
Description copied from interface: iStringArray
Find index of a string in a pre-sorted string array. Implemented in scfStringArray.

Specified by:
findSortedKey in interface iStringArray
Parameters:
value -
Returns:
See Also:
iStringArray.findSortedKey(java.lang.String)

get

public java.lang.String get(int n)
Description copied from interface: iStringArray
Get Nth string in vector. Implemented in scfStringArray.

Specified by:
get in interface iStringArray
Parameters:
n -
Returns:
See Also:
iStringArray.get(int)

insert

public boolean insert(int n,
                      java.lang.String value)
Description copied from interface: iStringArray
Insert a string before Nth string in the array. Implemented in scfStringArray.

Specified by:
insert in interface iStringArray
Parameters:
n -
value -
Returns:
See Also:
iStringArray.insert(int, java.lang.String)

length

public int length()
Description copied from interface: iStringArray
Query array length. Implemented in scfStringArray.

Specified by:
length in interface iStringArray
Returns:
See Also:
iStringArray.length()

pop

public java.lang.String pop()
Description copied from interface: iStringArray
Pop a string from the top of stack. Implemented in scfStringArray.

Specified by:
pop in interface iStringArray
Returns:
See Also:
iStringArray.pop()

push

public void push(java.lang.String value)
Description copied from interface: iStringArray
Push a string onto the stack. Implemented in scfStringArray.

Specified by:
push in interface iStringArray
Parameters:
value -
See Also:
iStringArray.push(java.lang.String)

sort

public void sort()
Description copied from interface: iStringArray
Sort the string array. Implemented in scfStringArray.

Specified by:
sort in interface iStringArray
See Also:
iStringArray.sort()