Overview | Package | Class | Use | Tree | 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 final class IntList

extends java.lang.Object

This is a simple container for native int values.

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

Field Summary
`int[]` | `list` Value array.
`int` | `size` Current array size.

Constructor Summary
`IntList()` Default constructor.
`IntList(int v)` Default constructor.
`IntList(int[] v)` Default constructor.

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.
`void` | `init()` Initializes the iterator.
`boolean` | `more()` Checks if the iterator offers more values.
`int` | `next()` Returns next iterated value.
`void` | `reset()` Resets the integer list.
`void` | `sort(byte[][] tok, boolean num, boolean asc)` Sorts the array in the order of the specified token array.

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

Field Detail

### list

    public int[] list

  Value array.

### size

    public int size

  Current array size.

Constructor Detail

### IntList

    public IntList()

  Default constructor.

### IntList

    public IntList(int v)

  Default constructor.

  Parameters:
    `v` - initial list value

### IntList

    public IntList(int[] v)

  Default constructor.

  Parameters:
    `v` - initial list values

Method Detail

### add

    public void add(int v)

  Adds next value.

  Parameters:
    `v` - value to be added

### 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

### init

    public void init()

  Initializes the iterator.

### more

    public boolean more()

  Checks if the iterator offers more values.

  Returns:
    true/false

### next

    public int next()

  Returns next iterated value.

  Returns:
    next value

### reset

    public void reset()

  Resets the integer list.

### sort

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

  Sorts the array in the order of the specified token array. This sort algorithm is derived from Java's highly optimized Arrays.sort array sort algorithms.

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

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