@Test public void serializationTest() throws Exception { CacheKey cacheKey = new CacheKey(); cacheKey.update("serializable"); Assert.assertEquals(cacheKey, serialize(cacheKey)); }
public void update(Object object) { int baseHashCode = object == null ? 1 : ArrayUtil.hashCode(object); count++; checksum += baseHashCode; baseHashCode *= count; hashcode = multiplier * hashcode + baseHashCode; updateList.add(object); }
CacheKey implements Cloneable, Serializable { public void update(Object object) { int baseHashCode = object == null ? 1 : ArrayUtil.hashCode(object); count++; checksum += baseHashCode; baseHashCode *= count; hashcode = multiplier * hashcode + baseHashCode; updateList.add(object); } }
CacheKey implements Cloneable, Serializable { public void update(Object object) { int baseHashCode = object == null ? 1 : ArrayUtil.hashCode(object); count++; checksum += baseHashCode; baseHashCode *= count; hashcode = multiplier * hashcode + baseHashCode; updateList.add(object); } CacheKey();  CacheKey(Object[] objects); }
CacheKey implements Cloneable, Serializable { public void update(Object object) { int baseHashCode = object == null ? 1 : ArrayUtil.hashCode(object); count++; checksum += baseHashCode; baseHashCode *= count; hashcode = multiplier * hashcode + baseHashCode; updateList.add(object); } CacheKey();  CacheKey(Object[] objects); int getUpdateCount(); void update(Object object); void updateAll(Object[] objects); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); @Override CacheKey clone(); }
CacheKey implements Cloneable, Serializable { public void update(Object object) { int baseHashCode = object == null ? 1 : ArrayUtil.hashCode(object); count++; checksum += baseHashCode; baseHashCode *= count; hashcode = multiplier * hashcode + baseHashCode; updateList.add(object); } CacheKey();  CacheKey(Object[] objects); int getUpdateCount(); void update(Object object); void updateAll(Object[] objects); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); @Override CacheKey clone(); static final CacheKey NULL_CACHE_KEY; }