org.sonar.duplications.block
Class ByteArray

java.lang.Object
  extended by org.sonar.duplications.block.ByteArray

public final class ByteArray
extends Object

Represents hash for Block. Immutable. TODO Godin: would be better to rename to BlockHash, also maybe we can incorporate it into Block to reduce memory footprint during detection of duplicates


Constructor Summary
ByteArray(byte[] bytes)
           
ByteArray(int value)
           
ByteArray(int[] intArray)
           
ByteArray(long value)
           
ByteArray(String hexString)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 String toHexString()
           
 int[] toIntArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteArray

public ByteArray(String hexString)

ByteArray

public ByteArray(byte[] bytes)

ByteArray

public ByteArray(long value)

ByteArray

public ByteArray(int value)

ByteArray

public ByteArray(int[] intArray)
Method Detail

toIntArray

public int[] toIntArray()

toHexString

public String toHexString()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2012 SonarSource. All Rights Reserved.