@Override public int hashCode() { return backingHashSet.hashCode(); }
@Override public int hashCode() { return backingHashSet.hashCode(); }
@Override public int hashCode() { return agencyAndStopIds.hashCode(); }
/** * {@inheritDoc} */ public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + ((subsets == null) ? 0 : subsets.hashCode()); return result; }
public void storeOfNull() { for (int i = 0; i < 10; i++) { HashSet<Integer> set = new HashSet<Integer>(); set.add(i); System.out.println(set.hashCode()); set = null; } }
private static void checkHashCode(Set<?> set) { assertEquals(Sets.newHashSet(set).hashCode(), set.hashCode()); }
@Test public void shouldHaveCompatibleEqualsAndHashcode() { final HashSet<Integer> compatibleSet = new HashSet<>(); final long seed = System.nanoTime(); final Random r = new Random(seed); for (int i = 0; i < 1024; i++) { final int value = r.nextInt(); compatibleSet.add(value); testSet.add(value); } assertEquals("Fail with seed:" + seed, testSet, compatibleSet); assertEquals("Fail with seed:" + seed, compatibleSet, testSet); assertEquals("Fail with seed:" + seed, compatibleSet.hashCode(), testSet.hashCode()); }
@Test public void shouldHaveCompatibleEqualsAndHashcode() { final HashSet<Integer> compatibleSet = new HashSet<>(); final long seed = System.nanoTime(); final Random r = new Random(seed); for (int i = 0; i < 1024; i++) { final int value = r.nextInt(); compatibleSet.add(value); testSet.add(value); } if (r.nextBoolean()) { compatibleSet.add(MISSING_VALUE); testSet.add(MISSING_VALUE); } assertEquals("Fail with seed:" + seed, testSet, compatibleSet); assertEquals("Fail with seed:" + seed, compatibleSet, testSet); assertEquals("Fail with seed:" + seed, compatibleSet.hashCode(), testSet.hashCode()); }
result = prime * result + ((deque == null) ? 0 : deque.hashCode()); result = prime * result + ((hashSet == null) ? 0 : hashSet.hashCode()); result = prime
h = h * 31 + new HashSet<RolapCalculation>( Arrays.asList(calculations) .subList(0, calculationCount)).hashCode(); h = h * 31 + slicerMembers.hashCode(); h = h * 31 + (expandingMember == null ? 0 : expandingMember.hashCode());
@Override public int hashCode() { return inputs != null ? inputs.hashCode() : 0; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((pfns == null) ? 0 : pfns.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((layerNames == null) ? 0 : layerNames.hashCode()); result = prime * result + ((layers == null) ? 0 : layers.hashCode()); result = prime * result + length; result = prime * result + numLayers; return result; }
/** @inheritDoc */ @Override public int hashCode() { int result; result = mode; result = 31 * result + strategy.hashCode(); result = 31 * result + new HashSet<SearchTerm>(Arrays.asList(searchTerms)).hashCode(); return result; } }
/** @inheritDoc */ @Override public int hashCode() { int result; result = mode; result = 31 * result + strategy.hashCode(); result = 31 * result + new HashSet<SearchTerm>(Arrays.asList(searchTerms)).hashCode(); return result; } }
@Override public int hashCode() { int result = 17; result = 37 * result + this.urlPattern.hashCode(); if (this.urlPatternList != null) result = 37 * result + this.urlPatternList.hashCode(); return result; }
@Override public int hashCode() { int result = 17; result = 37 * result + this.urlPattern.hashCode(); if (this.urlPatternList != null) result = 37 * result + this.urlPatternList.hashCode(); return result; }
/** * {@inheritDoc} * */ @Override public int hashCode() { this.initialize(); return this.delegate.hashCode(); }