Package net.sf.jasperreports.engine.util
Class ObjectUtils.HashCode
- java.lang.Object
-
- net.sf.jasperreports.engine.util.ObjectUtils.HashCode
-
- Enclosing class:
- ObjectUtils
public static class ObjectUtils.HashCode extends Object
Hash code creator for objects.
-
-
Constructor Summary
Constructors Constructor Description HashCode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(boolean value)
Adds a boolean value to the hash.void
add(int value)
Adds an integer value to the hash.void
add(Object value)
Adds an object to the hash, usingObject.hashCode().
void
add(JRPropertiesMap properties)
Adds a set of properties to the hash.void
addIdentical(Object value)
Adds an object to the hash, checking whether the object implementsDeduplicable
and using the deduplication hash code in that case.void
addIdentical(Object[] values)
Adds an array of objects to the hash, checking if the objects implementDeduplicable
.void
addIdentical(List<?> values)
Adds a list of objects to the hash, checking if the objects implementDeduplicable
.void
addIdentity(Object value)
Adds an object to the hash using its identity (System.identityHashCode
).protected void
addToHash(int value)
int
getHashCode()
-
-
-
Method Detail
-
addToHash
protected void addToHash(int value)
-
add
public void add(int value)
Adds an integer value to the hash.- Parameters:
value
-
-
add
public void add(boolean value)
Adds a boolean value to the hash.- Parameters:
value
-
-
add
public void add(Object value)
Adds an object to the hash, usingObject.hashCode().
- Parameters:
value
-
-
addIdentical
public void addIdentical(Object value)
Adds an object to the hash, checking whether the object implementsDeduplicable
and using the deduplication hash code in that case.- Parameters:
value
-
-
addIdentity
public void addIdentity(Object value)
Adds an object to the hash using its identity (System.identityHashCode
).- Parameters:
value
-
-
addIdentical
public void addIdentical(Object[] values)
Adds an array of objects to the hash, checking if the objects implementDeduplicable
.- Parameters:
values
-- See Also:
addIdentical(Object)
-
addIdentical
public void addIdentical(List<?> values)
Adds a list of objects to the hash, checking if the objects implementDeduplicable
.- Parameters:
values
-- See Also:
addIdentical(Object)
-
add
public void add(JRPropertiesMap properties)
Adds a set of properties to the hash.- Parameters:
properties
-
-
getHashCode
public int getHashCode()
-
-