Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.util
Class StringList

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

All Implemented Interfaces:
  Iterable<String>

    public final class StringList

extends Object
implements Iterable<String>

This is a simple container for string values.

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

Constructor Summary
`StringList()`

Method Summary
`void` | `add(String s)` Adds a string to the array.
`boolean` | `contains(String v)` Checks if the specified string is found in the list.
`String[]` | `finish()` Returns the string array.
`String` | `get(int p)` Returns the specified value.
`Iterator<String>` | `iterator()`
`int` | `size()` Returns the number of entries.
`void` | `sort(boolean cs, boolean asc)` Sorts the strings.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringList

    public StringList()

Method Detail

### add

    public void add(String s)

  Adds a string to the array.

  Parameters:
    `s` - string to be added

### size

    public int size()

  Returns the number of entries.

  Returns:
    number of entries

### get

    public String get(int p)

  Returns the specified value.

  Parameters:
    `p` - position
  Returns:
    value

### contains

    public boolean contains(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 String[] finish()

  Returns the string array.

  Returns:
    array

### sort

    public void sort(boolean cs,
                     boolean asc)

  Sorts the strings.

  Parameters:
    `cs` - respect case sensitivity
    `asc` - ascending/descending flag

### iterator

    public Iterator<String> iterator()

  Specified by:
    `iterator` in interface `Iterable<String>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD