@Test public void testToString() throws Exception { final Pair<String, String> pair = new Pair("Key", "Value"); assertEquals("Key:Value", pair.toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(key); builder.append(':'); builder.append(value); return builder.toString(); }
Pair implements Serializable { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(key); builder.append(':'); builder.append(value); return builder.toString(); } }
Pair implements Serializable { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(key); builder.append(':'); builder.append(value); return builder.toString(); } Pair(K key, V value); }
Pair implements Serializable { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(key); builder.append(':'); builder.append(value); return builder.toString(); } Pair(K key, V value); K getKey(); void setKey(K key); V getValue(); void setValue(V value); K getObject1(); V getObject2(); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString(); }
Pair implements Serializable { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(key); builder.append(':'); builder.append(value); return builder.toString(); } Pair(K key, V value); K getKey(); void setKey(K key); V getValue(); void setValue(V value); K getObject1(); V getObject2(); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString();  }