@Test public void keysAreImmutable() { assertThatClassIsImmutableBaseClass(Key.class); Key longKey = Key.of(0xabcdefL, NetTestTools.APP_ID); assertThatClassIsImmutable(longKey.getClass()); Key stringKey = Key.of("some key", NetTestTools.APP_ID); assertThatClassIsImmutable(stringKey.getClass()); }
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);  }