List of usage examples for java.util Arrays hashCode
public static int hashCode(Object a[])
From source file:de.schildbach.game.chess.ChessPosition.java
@Override public int hashCode() { int hashCode = super.hashCode(); hashCode *= 37;// w w w .j a v a 2s.c o m hashCode += Arrays.hashCode(castlingAvailableWhite); hashCode *= 37; hashCode += Arrays.hashCode(castlingAvailableBlack); hashCode *= 37; hashCode += ObjectUtils.hashCode(enPassantTargetSquare); return hashCode; }
From source file:se.kodapan.io.http.wayback.WaybackHeaderElement.java
@Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (value != null ? value.hashCode() : 0); result = 31 * result + (parameters != null ? Arrays.hashCode(parameters) : 0); return result; }
From source file:org.opendaylight.controller.cluster.raft.behaviors.SnapshotTrackerTest.java
@Test public void testAddChunks() throws IOException { try (SnapshotTracker tracker = new SnapshotTracker(LOG, 3, "leader", mockContext)) { tracker.addChunk(1, chunk1, Optional.of(LeaderInstallSnapshotState.INITIAL_LAST_CHUNK_HASH_CODE)); tracker.addChunk(2, chunk2, Optional.of(Arrays.hashCode(chunk1))); tracker.addChunk(3, chunk3, Optional.of(Arrays.hashCode(chunk2))); ByteSource snapshotBytes = tracker.getSnapshotBytes(); assertEquals("Deserialized", data, SerializationUtils.deserialize(snapshotBytes.read())); }/* www .ja va 2 s.c om*/ verify(fbos).cleanup(); }
From source file:com.opengamma.analytics.financial.forex.method.PresentValueForexBlackVolatilityQuoteSensitivityDataBundle.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _currencyPair.hashCode(); result = prime * result + Arrays.hashCode(_expiries); result = prime * result + Arrays.hashCode(_delta); result = prime * result + Arrays.hashCode(_vega); return result; }
From source file:edu.oregonstate.eecs.mcplan.domains.voyager.policies.ExpansionPolicy.java
@Override public int hashCode() { return new HashCodeBuilder(761, 769).append(player_).append(Arrays.hashCode(priority_list_)) .append(garrison_).toHashCode(); }
From source file:org.echocat.jomon.net.cluster.channel.Message.java
@Override public int hashCode() { int result = (int) getCommand(); result = 31 * result + Arrays.hashCode(getData()); result = 31 * result + getOffset();// ww w . j a va2 s . c o m result = 31 * result + getLength(); return result; }
From source file:therian.testfixture.Library.java
@Override public int hashCode() { int result = 91 << 4; result |= ObjectUtils.hashCode(getLibraryName()); result <<= 4;//from w w w. ja v a 2 s . c o m result |= ObjectUtils.hashCode(getTaggedBooks()); result <<= 4; result |= ObjectUtils.hashCode(getEmployees()); result <<= 4; result |= Arrays.hashCode(getPersons()); return result; }
From source file:org.commonjava.cartographer.graph.filter.DependencyOnlyFilter.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Arrays.hashCode(scopes); result = prime * result + (useImpliedScope ? 1231 : 1237); return result; }
From source file:org.whispersystems.textsecuregcm.entities.ClientContact.java
public int hashCode() { return Arrays.hashCode(this.token); }
From source file:org.codelibs.fess.dict.synonym.SynonymItem.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(inputs); result = prime * result + Arrays.hashCode(outputs); return result; }