org.extex.scanner.type.tokens
Class ImmutableTokens

java.lang.Object
  extended by org.extex.scanner.type.tokens.Tokens
      extended by org.extex.scanner.type.tokens.ImmutableTokens
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<Token>, FixedTokens

public class ImmutableTokens
extends Tokens

This class presents a Tokens register where all setters are disabled. This means that its value can not be altered once it has been created.

Version:
$Revision$
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class org.extex.scanner.type.tokens.Tokens
EMPTY
 
Constructor Summary
ImmutableTokens()
          Creates a new object.
 
Method Summary
 void add(Token t)
          Add another token to the end of the Tokens.
 void add(Tokens toks)
          Add another token list to the end of the Tokens.
 
Methods inherited from class org.extex.scanner.type.tokens.Tokens
clear, equals, get, hashCode, insert, iterator, length, pop, push, removeFirst, removeLast, show, toString, toString, toString, toText, toText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

ImmutableTokens

public ImmutableTokens()
Creates a new object. The new object has no items in it.

Method Detail

add

public void add(Token t)
Add another token to the end of the Tokens. This operation is unsupported and leads to an exception.

Overrides:
add in class Tokens
Parameters:
t - The token to add
See Also:
Tokens.add( org.extex.scanner.type.token.Token)

add

public void add(Tokens toks)
Add another token list to the end of the Tokens. This operation is unsupported and leads to an exception.

Overrides:
add in class Tokens
Parameters:
toks - the tokens to add
See Also:
Tokens.add( org.extex.scanner.type.tokens.Tokens)