org.basex.util
Class StringList

java.lang.Object
  extended by org.basex.util.StringList

public final class StringList
extends java.lang.Object

This is a simple container for string values.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
static StringList EMPTY
          Empty string list.
 java.lang.String[] list
          Current string array.
 int size
          Number of strings.
 
Constructor Summary
StringList()
           
 
Method Summary
 void add(java.lang.String s)
          Adds a string to the array.
 boolean contains(java.lang.String v)
          Checks if the specified string is found in the list.
 java.lang.String[] finish()
          Returns the string array.
 void sort()
          Sorts the array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final StringList EMPTY
Empty string list.


list

public java.lang.String[] list
Current string array.


size

public int size
Number of strings.

Constructor Detail

StringList

public StringList()
Method Detail

add

public void add(java.lang.String s)
Adds a string to the array.

Parameters:
s - string to be added

contains

public boolean contains(java.lang.String v)
Checks if the specified string is found in the list.

Parameters:
v - string to be checked
Returns:
true if value is found

finish

public java.lang.String[] finish()
Returns the string array.

Returns:
array

sort

public void sort()
Sorts the array.