@Test public void testToMapEntry() { Pair<Integer,String> pair = new Pair<>(10, "IO"); Entry<Integer,String> entry = pair.toMapEntry(); assertEquals(pair.getFirst(), entry.getKey()); assertEquals(pair.getSecond(), entry.getValue()); }
public Entry<A,B> toMapEntry() { return new SimpleImmutableEntry<>(getFirst(), getSecond()); }
Pair { public Entry<A,B> toMapEntry() { return new SimpleImmutableEntry<>(getFirst(), getSecond()); } }
Pair { public Entry<A,B> toMapEntry() { return new SimpleImmutableEntry<>(getFirst(), getSecond()); } Pair(A f, B s); }
Pair { public Entry<A,B> toMapEntry() { return new SimpleImmutableEntry<>(getFirst(), getSecond()); } Pair(A f, B s); @Override int hashCode(); @Override boolean equals(Object o); A getFirst(); B getSecond(); @Override String toString(); String toString(String prefix, String separator, String suffix); Entry<A,B> toMapEntry(); Pair<B,A> swap(); static Pair<K2,V2> fromEntry(Entry<K1,V1> entry); }
Pair { public Entry<A,B> toMapEntry() { return new SimpleImmutableEntry<>(getFirst(), getSecond()); } Pair(A f, B s); @Override int hashCode(); @Override boolean equals(Object o); A getFirst(); B getSecond(); @Override String toString(); String toString(String prefix, String separator, String suffix); Entry<A,B> toMapEntry(); Pair<B,A> swap(); static Pair<K2,V2> fromEntry(Entry<K1,V1> entry);  }