@Test public void testEquals() throws Exception { Long[] params = {1L, 2L}; DefaultGeneratedCacheKey key2 = new DefaultGeneratedCacheKey(params); assertTrue(key.equals(key2)); Long[] params2 = {1L, 3L}; key2 = new DefaultGeneratedCacheKey(params2); assertFalse(key.equals(key2)); Long[] params3 = {1L, 2L, 3L}; key2 = new DefaultGeneratedCacheKey(params3); assertFalse(key.equals(key2)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (this.hashCode != obj.hashCode()) return false; DefaultGeneratedCacheKey other = (DefaultGeneratedCacheKey) obj; return Arrays.deepEquals(this.parameters, other.parameters); }
DefaultGeneratedCacheKey implements GeneratedCacheKey { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (this.hashCode != obj.hashCode()) return false; DefaultGeneratedCacheKey other = (DefaultGeneratedCacheKey) obj; return Arrays.deepEquals(this.parameters, other.parameters); } }
DefaultGeneratedCacheKey implements GeneratedCacheKey { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (this.hashCode != obj.hashCode()) return false; DefaultGeneratedCacheKey other = (DefaultGeneratedCacheKey) obj; return Arrays.deepEquals(this.parameters, other.parameters); } DefaultGeneratedCacheKey(Object[] parameters); }
DefaultGeneratedCacheKey implements GeneratedCacheKey { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (this.hashCode != obj.hashCode()) return false; DefaultGeneratedCacheKey other = (DefaultGeneratedCacheKey) obj; return Arrays.deepEquals(this.parameters, other.parameters); } DefaultGeneratedCacheKey(Object[] parameters); @Override int hashCode(); @Override boolean equals(Object obj); }
DefaultGeneratedCacheKey implements GeneratedCacheKey { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (this.hashCode != obj.hashCode()) return false; DefaultGeneratedCacheKey other = (DefaultGeneratedCacheKey) obj; return Arrays.deepEquals(this.parameters, other.parameters); } DefaultGeneratedCacheKey(Object[] parameters); @Override int hashCode(); @Override boolean equals(Object obj);  }