public int hashCode() { return _unzoomedPoint.hashCode(); }
class TheObject { private final java.util.List<Point> points; public TheObject(List<Point> points) { this.points = points; } @Override public int hashCode() { int hash = 17;int tmp = 0; for (Point p : points) { tmp = (hash + p.hashCode()); hash = (tmp << 5) - tmp; } return hash; } }
int count = 0; p = new Point(p.x-1, p.y-1); // new point here if (data.contains(p)) { count++; } else if (addingDeadCells) { deadCellsToCheck.add(p); for (Point z : deadCellsToCheck) { System.out.println(z.toString() + " " + z.hashCode()); } System.out.println(); }
@Override public int hashCode() { int hash = 7; hash = 53 * hash + (this.element != null ? this.element.hashCode() : 0); hash = 53 * hash + (this.p != null ? this.p.hashCode() : 0); return hash; }
/** * Returns a hashcode value for this transition. * * @return a hashcode value for this transition. */ public int hashCode() { /* store computed value */ if (hash != Integer.MIN_VALUE) return hash; int x, y, z; if (start == null) x = 0; else x = start.hashCode(); if (end == null) y = 0; else y = end.hashCode(); if (label == null) z = 0; else z = label.hashCode(); int t = new java.awt.Point(x, y).hashCode(); return hash = new java.awt.Point(t, z).hashCode(); }
@Override public int hashCode() { /* store computed value */ if (hash != Integer.MIN_VALUE) return hash; int x, y, z; if (start == null) x = 0; else x = start.hashCode(); if (end == null) y = 0; else y = end.hashCode(); if (label == null) z = 0; else z = label.hashCode(); int t = new java.awt.Point(x, y).hashCode(); return hash = new java.awt.Point(t, z).hashCode(); } }
public static synchronized Cursor getCursor(final PixelRectangle pixelrect, final Point hotSpot) { // 31 * x == (x << 5) - x int hash = 31 + pixelrect.hashCode(); hash = ((hash << 5) - hash) + hotSpot.hashCode(); final Integer key = Integer.valueOf(hash); Cursor cursor = cursorMap.get(key); if( null == cursor ) { cursor = createCursor(pixelrect, hotSpot); cursorMap.put(key, cursor); } return cursor; } private static synchronized Cursor createCursor(final PixelRectangle pixelrect, final Point hotSpot) {
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (autoLevel ? 1231 : 1237); result = prime * result + brightness; long temp; temp = Double.doubleToLongBits(calibrationRatio); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + ((calibrationUnit == null) ? 0 : calibrationUnit.hashCode()); result = prime * result + contrast; result = prime * result + ((cropZone == null) ? 0 : cropZone.hashCode()); result = prime * result + (flip ? 1231 : 1237); result = prime * result + ((layerOffset == null) ? 0 : layerOffset.hashCode()); result = prime * result + orientation; result = prime * result + rotation; result = prime * result + ((ratio == null) ? 0 : ratio.hashCode()); return result; }