@Test public void testConvenienceFactory() { assertThat(key("a", "b")) .isEqualTo(new Key("a", "b")); }
public Key(Object... contents) { this.contents = contents; if (contents != null && contents.length != 0) { for (Object content : contents) { hashCode = hashCode * CONSTANT + (content == null ? NULL_HASH_CODE : content.hashCode()); } } else { hashCode = hashCode * CONSTANT + NULL_HASH_CODE; } }
Key { public Key(Object... contents) { this.contents = contents; if (contents != null && contents.length != 0) { for (Object content : contents) { hashCode = hashCode * CONSTANT + (content == null ? NULL_HASH_CODE : content.hashCode()); } } else { hashCode = hashCode * CONSTANT + NULL_HASH_CODE; } } }
Key { public Key(Object... contents) { this.contents = contents; if (contents != null && contents.length != 0) { for (Object content : contents) { hashCode = hashCode * CONSTANT + (content == null ? NULL_HASH_CODE : content.hashCode()); } } else { hashCode = hashCode * CONSTANT + NULL_HASH_CODE; } } Key(Object... contents); }
Key { public Key(Object... contents) { this.contents = contents; if (contents != null && contents.length != 0) { for (Object content : contents) { hashCode = hashCode * CONSTANT + (content == null ? NULL_HASH_CODE : content.hashCode()); } } else { hashCode = hashCode * CONSTANT + NULL_HASH_CODE; } } Key(Object... contents); static Key key(Object... contents); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Key { public Key(Object... contents) { this.contents = contents; if (contents != null && contents.length != 0) { for (Object content : contents) { hashCode = hashCode * CONSTANT + (content == null ? NULL_HASH_CODE : content.hashCode()); } } else { hashCode = hashCode * CONSTANT + NULL_HASH_CODE; } } Key(Object... contents); static Key key(Object... contents); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }