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

All Superinterfaces:
Comparable<Tuple3<A,B,C>>, FirstAware<A>, SecondAware<B>, ThirdAware<C>, ToListAware<Object>

public interface Tuple3<A,B,C>
extends ToListAware<Object>, FirstAware<A>, SecondAware<B>, ThirdAware<C>, Comparable<Tuple3<A,B,C>>

Since:
1.2
Author:
flbulgarelli

Method Summary
 Tuple3<B,C,A> rotateLeft()
           Rotates this Tuple3 components to left, creating a new one where the first component is placed at the third position, an the rests, shifted right.
 Tuple3<C,A,B> rotateRight()
           Rotates this Tuple3 components to right, creating a new one where the third component is placed at the first position, an the rests, shifted right.
 
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 net.sf.staccatocommons.defs.partial.ThirdAware
_2, third
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

rotateLeft

@NonNull
Tuple3<B,C,A> rotateLeft()

Rotates this Tuple3 components to left, creating a new one where the first component is placed at the third position, an the rests, shifted right.

Given a triple whose components a, b, c implement appropriately equals method, the following is always true

_(a,b,c).rotateLeft().equals(_(b,c,a))
 
 

Returns:
a new, non null Tuple3, with its components rotated to left

rotateRight

@NonNull
Tuple3<C,A,B> rotateRight()

Rotates this Tuple3 components to right, creating a new one where the third component is placed at the first position, an the rests, shifted right.

Given a triple whose components a, b, c implement appropriately equals method, the following is always true

_(a,b,c).rotateLeft().equals(_(c,b,a))
 
 

Returns:
a new, non null Tuple3, with its components rotated to right


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