anthill.types
Interface HashedKeyword

All Superinterfaces:
Closeness, Comparable
All Known Implementing Classes:
SHAHashedKeyword, SimpleHashedKeyword

public interface HashedKeyword
extends Comparable, Closeness

This interface represents an hashed keyword, used in ant algorithms based on hash routing. An hashed keyword contains two values, the keyword maintained as a plain-text string, and the hash value maintained as an array of bytes.

Version:
$Revision: 1.2 $
Author:
Alberto Montresor (montresor@cs.unibo.it)

Field Summary
static String NAME
           
 
Method Summary
 byte[] getBytes()
          Returns the bytes representing the hashed value of the keyword.
 String getKeyword()
          Returns the keyword associated with this hashed keyword.
 void init(String keyword)
          Initializes the hashed keyword by setting the keyword contained in it.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface anthill.types.Closeness
isCloser
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Method Detail

init

public void init(String keyword)
Initializes the hashed keyword by setting the keyword contained in it.


getKeyword

public String getKeyword()
Returns the keyword associated with this hashed keyword.


getBytes

public byte[] getBytes()
Returns the bytes representing the hashed value of the keyword.