de.dante.extex.interpreter.type.hash.toks
Class HashToks

java.lang.Object
  extended byde.dante.extex.interpreter.type.hash.toks.HashToks
All Implemented Interfaces:
java.io.Serializable

public class HashToks
extends java.lang.Object
implements java.io.Serializable

A Hash for Tokens.

Version:
$Revision: 1.10 $
Author:
Michael Niedermair
See Also:
Serialized Form

Constructor Summary
HashToks()
          Creates a new object.
HashToks(Context context, TokenSource source, Typesetter typesetter)
          Creates a new object.
 
Method Summary
 boolean containsKey(java.lang.String key)
          Contains the key
 Tokens get(java.lang.String key)
          Return the tokens for a key.
 void put(java.lang.String key, Tokens toks)
          Put the tokens on the hash with the key.
 int size()
          Return the size of the hash.
 java.lang.String toString()
          Return the value as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashToks

public HashToks()
Creates a new object.


HashToks

public HashToks(Context context,
                TokenSource source,
                Typesetter typesetter)
         throws InterpreterException
Creates a new object. get the TokenSource for a HashToks (noexpand).

Parameters:
context - the context
source - the token source
Throws:
InterpreterException - if an error occurs.
Method Detail

put

public void put(java.lang.String key,
                Tokens toks)
Put the tokens on the hash with the key.

Parameters:
key - the key
toks - the tokens

get

public Tokens get(java.lang.String key)
Return the tokens for a key.

Parameters:
key - the key
Returns:
the token for this key

size

public int size()
Return the size of the hash.

Returns:
the size of the hash

containsKey

public boolean containsKey(java.lang.String key)
Contains the key

Parameters:
key - the key
Returns:
true if the key exists, otherwise false

toString

public java.lang.String toString()
Return the value as String

Returns:
the value as String