de.uniba.wiai.lspi.chord.console.command.entry
Class Key

java.lang.Object
  extended by de.uniba.wiai.lspi.chord.console.command.entry.Key
All Implemented Interfaces:
Key

public final class Key
extends java.lang.Object
implements Key

Represents a key used within console to store a Value within a chord network.

Version:
1.0.5
Author:
sven

Constructor Summary
Key(java.lang.String key1)
          Creates a new instance of Key
 
Method Summary
 boolean equals(java.lang.Object o)
           
 byte[] getBytes()
          Returns the byte for this key which is then used to calculate a unique ID for storage in the chord network.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Key

public Key(java.lang.String key1)
Creates a new instance of Key

Parameters:
key1 -
Method Detail

getBytes

public byte[] getBytes()
Returns the byte for this key which is then used to calculate a unique ID for storage in the chord network.

Specified by:
getBytes in interface Key
Returns:
Byte representation of the key.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object