@Test public void stringKey() { Key stringKey1 = Key.of(KEY_1, NetTestTools.APP_ID); Key copyOfStringKey1 = Key.of(KEY_1, NetTestTools.APP_ID); Key stringKey2 = Key.of(KEY_2, NetTestTools.APP_ID); Key copyOfStringKey2 = Key.of(KEY_2, NetTestTools.APP_ID); Key stringKey3 = Key.of(KEY_3, NetTestTools.APP_ID); new EqualsTester() .addEqualityGroup(stringKey1, copyOfStringKey1) .addEqualityGroup(stringKey2, copyOfStringKey2) .addEqualityGroup(stringKey3) .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);  }