net.sf.staccatocommons.defs.tuple
Interface Tuple2<A,B>

All Superinterfaces:
Comparable<Tuple2<A,B>>, FirstAware<A>, Map.Entry<A,B>, SecondAware<B>, ToListAware<Object>

public interface Tuple2<A,B>
extends ToListAware<Object>, FirstAware<A>, SecondAware<B>, Comparable<Tuple2<A,B>>, Map.Entry<A,B>

Since:
1.2
Author:
flbulgarelli

Method Summary
 Tuple2<B,A> swap()
          answers a new Tuple2, with swaped components
 
Methods inherited from interface net.sf.staccatocommons.defs.partial.ToListAware
toArray, toList
 
Methods inherited from interface net.sf.staccatocommons.defs.partial.FirstAware
_0, first
 
Methods inherited from interface net.sf.staccatocommons.defs.partial.SecondAware
_1, second
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.util.Map.Entry
equals, getKey, getValue, hashCode, setValue
 

Method Detail

swap

@NonNull
Tuple2<B,A> swap()
answers a new Tuple2, with swaped components

Returns:
a new pair, never null.


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads