|
Dresden OCL Toolkit | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttudresden.ocl.injection.lib.HashExact
Provides static methods for calculating hash codes.
These methods emulate the hashCode()
methods of the corresponding classes, but calls
System.identityHashCode(Object)
for each contained object.
| Constructor Summary | |
HashExact()
|
|
| Method Summary | |
static int |
identityHashCode(Collection list)
Calculates the hash code as defined in List.hashCode(), but calls
System.identityHashCode(Object)
for each contained object. |
static int |
identityHashCode(Map map)
Calculates the hash code as defined in Map.hashCode(), but calls
System.identityHashCode(Object)
for each contained object. |
static int |
identityHashCode(Object[] array)
Calculates the hash code equivalent to identityHashCode(Collection),
but for arrays instead of lists. |
static int |
identityHashCode(Set set)
Calculates the hash code as defined in Set.hashCode(), but calls
System.identityHashCode(Object)
for each contained object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HashExact()
| Method Detail |
public static final int identityHashCode(Collection list)
List.hashCode(), but calls
System.identityHashCode(Object)
for each contained object.
For null arguments it returns the same value as for
empty lists.
Is also responsible for java.util.Collection.
There it's not known, whether order and duplicates
matter, so we are on the save side, if we assume so.
public static final int identityHashCode(Object[] array)
identityHashCode(Collection),
but for arrays instead of lists.
For null arguments it returns the same value as for
empty arrays.
public static final int identityHashCode(Set set)
Set.hashCode(), but calls
System.identityHashCode(Object)
for each contained object.
For null arguments it returns the same value as for
empty sets.
public static final int identityHashCode(Map map)
Map.hashCode(), but calls
System.identityHashCode(Object)
for each contained object.
For null arguments it returns the same value as for
empty maps.
|
Dresden OCL Toolkit | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||