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

## cc.mallet.types
Class TokenSequence

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList<Token>
                  cc.mallet.types.TokenSequence

All Implemented Interfaces:
  Sequence, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Token>, java.util.Collection<Token>, java.util.List<Token>, java.util.RandomAccess

Direct Known Subclasses:
  StringTokenization

    public class TokenSequence

extends java.util.ArrayList<Token>
implements Sequence, java.io.Serializable

A representation of a piece of text, usually a single word, to which we can attach properties.

See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`TokenSequence()`
`TokenSequence(java.util.Collection<Token> tokens)`
`TokenSequence(int capacity)`
`TokenSequence(java.lang.Object[] tokens)`
`TokenSequence(Token[] tokens)`

Method Summary
`void` | `add(java.lang.String string)`
`void` | `addAll(java.lang.Object[] objects)`
`double` | `getNumericProperty(java.lang.String key)`
`PropertyList` | `getProperties()`
`java.lang.Object` | `getProperty(java.lang.String key)`
`boolean` | `hasProperty(java.lang.String key)`
`java.lang.Object` | `removeLast()`
`void` | `setNumericProperty(java.lang.String key, double value)`
`void` | `setProperty(java.lang.String key, java.lang.Object value)`
`FeatureSequence` | `toFeatureSequence(Alphabet dict)`
`FeatureVector` | `toFeatureVector(Alphabet dict)`
`java.lang.String` | `toString()`
`java.lang.String` | `toStringShort()`

Methods inherited from class java.util.ArrayList
`add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll`

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

Methods inherited from interface cc.mallet.types.Sequence
`get, size`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Constructor Detail

### TokenSequence

    public TokenSequence(java.util.Collection<Token> tokens)

### TokenSequence

    public TokenSequence()

### TokenSequence

    public TokenSequence(int capacity)

### TokenSequence

    public TokenSequence(Token[] tokens)

### TokenSequence

    public TokenSequence(java.lang.Object[] tokens)

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.util.AbstractCollection<Token>`

### toStringShort

    public java.lang.String toStringShort()

### add

    public void add(java.lang.String string)

### removeLast

    public java.lang.Object removeLast()

### addAll

    public void addAll(java.lang.Object[] objects)

### toFeatureSequence

    public FeatureSequence toFeatureSequence(Alphabet dict)

### toFeatureVector

    public FeatureVector toFeatureVector(Alphabet dict)

### setNumericProperty

    public void setNumericProperty(java.lang.String key,
                                   double value)

### setProperty

    public void setProperty(java.lang.String key,
                            java.lang.Object value)

### getNumericProperty

    public double getNumericProperty(java.lang.String key)

### getProperty

    public java.lang.Object getProperty(java.lang.String key)

### hasProperty

    public boolean hasProperty(java.lang.String key)

### getProperties

    public PropertyList getProperties()

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