info.simongibbs.scoof
Class Hit

java.lang.Object
  extended byinfo.simongibbs.scoof.Specifier
      extended byinfo.simongibbs.scoof.Hit
All Implemented Interfaces:
java.lang.Comparable

public class Hit
extends Specifier

Represents a block of comment code under examination, doesn't actually store the comment, only the digest (MD5) and the File associated with it.

Version:
$Revision: 1.4 $
Author:
Simon Gibbs

Constructor Summary
Hit()
          Constructor for Hit.
Hit(Passage p)
           
 
Method Summary
 void calcMd5(java.lang.String code)
           
 boolean equals(java.lang.Object obj)
          Equality is evaluated on the basis of all fields.
 byte[] getDigest()
          Returns the digested bytes.
 void setDigest(byte[] b)
          Overwrites the digest with new data
 java.lang.String toString()
          Formats the digest and file path in a CSV compatible format.
 
Methods inherited from class info.simongibbs.scoof.Specifier
compareTo, getGenerator, getLine, getOriginalLength, getSource, setGenerator, setLine, setOriginalLength, setSource
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Hit

public Hit()
Constructor for Hit.


Hit

public Hit(Passage p)
Method Detail

getDigest

public byte[] getDigest()
Returns the digested bytes.

Returns:
byte[]

setDigest

public void setDigest(byte[] b)
Overwrites the digest with new data

Parameters:
b - externally calculated digest bytes

calcMd5

public void calcMd5(java.lang.String code)
             throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

equals

public boolean equals(java.lang.Object obj)
Equality is evaluated on the basis of all fields.

See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Formats the digest and file path in a CSV compatible format.

See Also:
Object.toString()