Java tutorial
//package com.java2s; /* * This file is part of the HyperGraphDB source distribution. This is copyrighted * software. For permitted uses, licensing options and redistribution, please see * the LicensingInformation file at the root level of the distribution. * * Copyright (c) 2005-2010 Kobrix Software, Inc. All rights reserved. */ public class Main { /** * <p>Return an object's hash code or 0 if the object is <code>null</code>.</p> */ public static int hashIt(Object o) { if (o == null) return 0; else return o.hashCode(); } }