Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.common.util
Class HashCode

    java.lang.Object
      org.modeshape.common.util.HashCode

    @Immutable
    public class HashCode

extends Object

Utilities for easily computing hash codes. The algorithm should generally produce good distributions for use in hash-based containers or collections, but as expected does always result in repeatable hash codes given the inputs.

Constructor Summary
`HashCode()`

Method Summary
`protected static int` | `compute(int seed, Object... objects)` Compute a combined hash code from the supplied objects using the supplied seed.
`static int` | `compute(Object... objects)` Compute a combined hash code from the supplied objects.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HashCode

    public HashCode()

Method Detail

### compute

    public static int compute(Object... objects)

  Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied.

  Parameters:
    `objects` - the objects that should be used to compute the hash code
  Returns:
    the hash code

### compute

    protected static int compute(int seed,
                                 Object... objects)

  Compute a combined hash code from the supplied objects using the supplied seed.

  Parameters:
    `seed` - a value upon which the hash code will be based; may be 0
    `objects` - the objects that should be used to compute the hash code
  Returns:
    the hash code

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.