@Test public void longKey() { Key longKey1 = Key.of(LONG_KEY_1, NetTestTools.APP_ID); Key copyOfLongKey1 = Key.of(LONG_KEY_1, NetTestTools.APP_ID); Key longKey2 = Key.of(LONG_KEY_2, NetTestTools.APP_ID); Key copyOfLongKey2 = Key.of(LONG_KEY_2, NetTestTools.APP_ID); Key longKey3 = Key.of(LONG_KEY_3, NetTestTools.APP_ID); new EqualsTester() .addEqualityGroup(longKey1, copyOfLongKey1) .addEqualityGroup(longKey2, copyOfLongKey2) .addEqualityGroup(longKey3) .testEquals(); }
public static Key of(String key, ApplicationId appId) { return new StringKey(key, appId); }
Key implements Comparable<Key> { public static Key of(String key, ApplicationId appId) { return new StringKey(key, appId); } }
Key implements Comparable<Key> { public static Key of(String key, ApplicationId appId) { return new StringKey(key, appId); } protected  Key(long hash); }
Key implements Comparable<Key> { public static Key of(String key, ApplicationId appId) { return new StringKey(key, appId); } protected  Key(long hash); long hash(); @Override int hashCode(); @Override abstract boolean equals(Object obj); static Key of(String key, ApplicationId appId); static Key of(long key, ApplicationId appId); }
Key implements Comparable<Key> { public static Key of(String key, ApplicationId appId) { return new StringKey(key, appId); } protected  Key(long hash); long hash(); @Override int hashCode(); @Override abstract boolean equals(Object obj); static Key of(String key, ApplicationId appId); static Key of(long key, ApplicationId appId);  }