@SuppressWarnings("static-method") @Test public void testHashCode() { final List<Edge<Character>> edges1 = allEdges(); final List<Edge<Character>> edges2 = allEdges(); for (int i = 0; i < edges1.size(); i++) { final Edge<Character> edge1 = edges1.get(i); for (int j = 0; j < edges2.size(); j++) { final Edge<Character> edge2 = edges2.get(j); if (i == j) { Assert.assertEquals( String.format("%s.hashCode() == %s.hashCode(); ", edge1, edge2), edge1.hashCode(), edge2.hashCode()); } } } }
@Override public int hashCode() { final int prime = 31; return prime * state + ((symbol == null) ? 0 : symbol.hashCode()); }
Edge implements IEdge<S> { @Override public int hashCode() { final int prime = 31; return prime * state + ((symbol == null) ? 0 : symbol.hashCode()); } }
Edge implements IEdge<S> { @Override public int hashCode() { final int prime = 31; return prime * state + ((symbol == null) ? 0 : symbol.hashCode()); } Edge(final S symbol_, final int state_); }
Edge implements IEdge<S> { @Override public int hashCode() { final int prime = 31; return prime * state + ((symbol == null) ? 0 : symbol.hashCode()); } Edge(final S symbol_, final int state_); @Override S getSymbol(); @Override int getState(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); }
Edge implements IEdge<S> { @Override public int hashCode() { final int prime = 31; return prime * state + ((symbol == null) ? 0 : symbol.hashCode()); } Edge(final S symbol_, final int state_); @Override S getSymbol(); @Override int getState(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }