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 IntList

    java.lang.Object
      org.basex.util.IntList

    public class IntList

extends java.lang.Object

This is a simple container for native int values.

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

Constructor Summary
`IntList()` Default constructor.
`IntList(int is)` Constructor, specifying an initial list size.
`IntList(int[] v)` Constructor, specifying an initial array.

Method Summary
`void` | `add(int v)` Adds next value.
`boolean` | `contains(int v)` Checks if the specified value is found in the list.
`int[]` | `finish()` Finishes the int array.
`int` | `get(int p)` Returns the specified value.
`void` | `reset()` Resets the integer list.
`void` | `set(int v, int p)` Sets a value at the specified position.
`int` | `size()` Returns the number of entries.
`void` | `sort()` Sorts the data.
`void` | `sort(byte[][] tok, boolean num, boolean asc)` Sorts the data in the order of the specified token array.
`void` | `sort(double[] num, boolean asc)` Sorts the data in the order of the specified numeric array.
`java.lang.String` | `toString()`

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

Constructor Detail

### IntList

    public IntList()

  Default constructor.

### IntList

    public IntList(int is)

  Constructor, specifying an initial list size.

  Parameters:
    `is` - initial size of the list

### IntList

    public IntList(int[] v)

  Constructor, specifying an initial array.

  Parameters:
    `v` - initial list values

Method Detail

### add

    public void add(int v)

  Adds next value.

  Parameters:
    `v` - value to be added

### size

    public int size()

  Returns the number of entries.

  Returns:
    number of entries

### get

    public int get(int p)

  Returns the specified value.

  Parameters:
    `p` - position
  Returns:
    value

### set

    public void set(int v,
                    int p)

  Sets a value at the specified position.

  Parameters:
    `v` - value to be added
    `p` - position

### contains

    public boolean contains(int v)

  Checks if the specified value is found in the list.

  Parameters:
    `v` - value to be added
  Returns:
    true if value is found

### finish

    public int[] finish()

  Finishes the int array.

  Returns:
    int array

### reset

    public void reset()

  Resets the integer list.

### sort

    public void sort()

  Sorts the data.

### sort

    public void sort(byte[][] tok,
                     boolean num,
                     boolean asc)

  Sorts the data in the order of the specified token array. Note that the input array will be resorted as well. - Sorting is derived from Java's sort algorithms in the {Arrays} class.

  Parameters:
    `tok` - token array to sort by
    `num` - numeric sort
    `asc` - ascending

### sort

    public void sort(double[] num,
                     boolean asc)

  Sorts the data in the order of the specified numeric array. Note that the input array will be resorted as well. - Sorting is derived from Java's sort algorithms in the {Arrays} class.

  Parameters:
    `num` - token array to sort by
    `asc` - ascending

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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