Framework Professional Edition Package


com.prosyst.util.hash
Class Key

java.lang.Object
  extended by com.prosyst.util.hash.Key

public class Key
extends java.lang.Object

Helper class for keeping property names in XProperties


Field Summary
 byte[] bytes
          the key as a byte[]
 java.lang.String s
          the key as a String
 
Constructor Summary
Key(java.lang.String s, byte[] bytes)
          Constructs a Key instance.
 
Method Summary
static boolean compare(byte[] b1, byte[] b2)
          Helper method for comparing byte[]-s
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

bytes

public byte[] bytes
the key as a byte[]


s

public java.lang.String s
the key as a String

Constructor Detail

Key

public Key(java.lang.String s,
           byte[] bytes)
Constructs a Key instance. If s is null, the String representation of the key is constructed from the bytes argument. If bytes is null, the byte[] representation of the key is constructed from the s argument.

Method Detail

hashCode

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

equals

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

toString

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

compare

public static boolean compare(byte[] b1,
                              byte[] b2)
Helper method for comparing byte[]-s


Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved