org.apache.commons.httpclient.util

Class LangUtils


public class LangUtils
extends java.lang.Object

A set of utility methods to help produce consistent Object#equals(Object) and Object#hashCode methods.
Author:
Oleg Kalnichevski
Since:
3.0

Field Summary

static int
HASH_OFFSET
static int
HASH_SEED

Method Summary

static boolean
equals(Object obj1, Object obj2)
static int
hashCode(int seed, Object obj)
static int
hashCode(int seed, boolean b)
static int
hashCode(int seed, int hashcode)

Field Details

HASH_OFFSET

public static final int HASH_OFFSET
Field Value:
37

HASH_SEED

public static final int HASH_SEED
Field Value:
17

Method Details

equals

public static boolean equals(Object obj1,
                             Object obj2)

hashCode

public static int hashCode(int seed,
                           Object obj)

hashCode

public static int hashCode(int seed,
                           boolean b)

hashCode

public static int hashCode(int seed,
                           int hashcode)

Copyright (c) 1999-2005 - Apache Software Foundation