FileDocCategorySizeDatePackage
HashCodeUtils.javaAPI DocAzureus 3.0.3.41972Fri Feb 24 12:31:36 GMT 2006com.aelitis.azureus.core.util

HashCodeUtils

public final class HashCodeUtils extends Object
author
MjrTom Feb 24, 2006 This is for utilities for calculating custom object hashCode() values

Fields Summary
Constructors Summary
Methods Summary
public static final inthashMore(int hash, int more)

        int result =hash <<1;
        if (result <0)
            result |=1;
        return result ^more;
    
public static final inthashMore(int hash, long more)

        int result =hashMore(hash, (int)(more >>>32));
        return hashMore(result, (int)(more &0xffff));
    
public static final inthashMore(int hash, boolean[] more)

        int result =hash <<1;
        if (result <0)
            result |=1;
        if (more[0])
            result ^=1;
        for (int i =1; i <more.length; i++)
        {
            result <<=1;
            if (result <0)
                result |=1;
            if (more[i])
                result ^=1;
        }
        return result;