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

## org.maltparser.ml.lib
Class FeatureList

    java.lang.Object
      org.maltparser.ml.lib.FeatureList

    public class FeatureList

extends Object

The feature list is sorted according to the compareTo of the node.

Author:
  Johan Hall

Constructor Summary
`FeatureList()` Creates a feature list of MaltFeatureNode objects
`FeatureList(int size)` Creates a feature list of MaltFeatureNode objects

Method Summary
`void` | `add(int index, double value)` Adds an index/value pair to the feature list.
`void` | `add(MaltFeatureNode x)` Adds a MaltFeatureNode object to the feature list.
`void` | `clear()` Clears the feature list
`MaltFeatureNode` | `get(int i)`
`int` | `size()`
`MaltFeatureNode[]` | `toArray()`

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

Constructor Detail

### FeatureList

    public FeatureList()

  Creates a feature list of MaltFeatureNode objects

### FeatureList

    public FeatureList(int size)

  Creates a feature list of MaltFeatureNode objects

Method Detail

### add

    public void add(MaltFeatureNode x)

  Adds a MaltFeatureNode object to the feature list. The object will be added in the sorted feature list based on the compareTo() in MaltFeatureNode.

  Parameters:
    `x` - a MaltFeatureNode object

### add

    public void add(int index,
                    double value)

  Adds an index/value pair to the feature list.

  Parameters:
    `index` - a binarized feature index
    `value` - a value

### get

    public MaltFeatureNode get(int i)

  Parameters:
    `i` - the position in the feature list
  Returns:
    a MaltFeatureNode object located on the position i

### clear

    public void clear()

  Clears the feature list

### size

    public int size()

  Returns:
    the size of the feature list

### toArray

    public MaltFeatureNode[] toArray()

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

Copyright 2007-2011 Johan Hall, Jens Nilsson and Joakim Nivre.