eu.planets_project.services.datatypes
Class Checksum

java.lang.Object
  extended by eu.planets_project.services.datatypes.Checksum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Checksum>

public final class Checksum
extends java.lang.Object
implements java.lang.Comparable<Checksum>, java.io.Serializable

Immutable representation of a checksum, containing of the algorithm used and the actual value.

See Also:
ChecksumTests, Serialized Form

Constructor Summary
Checksum(java.lang.String algorithm, java.lang.String value)
           
 
Method Summary
 int compareTo(Checksum o)
          
 boolean equals(java.lang.Object obj)
          
 java.lang.String getAlgorithm()
           
 java.lang.String getValue()
           
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Checksum

public Checksum(java.lang.String algorithm,
                java.lang.String value)
Parameters:
algorithm - The checksum algorithm.
value - The checksum value.
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
The checksum algorithm.

getValue

public java.lang.String getValue()
Returns:
The checksum value.

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

compareTo

public int compareTo(Checksum o)

Specified by:
compareTo in interface java.lang.Comparable<Checksum>
See Also:
Comparable.compareTo(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.