Class JoinRecord<K,L,R>
- java.lang.Object
-
- org.pipecraft.pipes.sync.inter.join.JoinRecord<K,L,R>
-
- Type Parameters:
K- The key typeL- The type of 'left' valuesR- The type of 'right' values
public class JoinRecord<K,L,R> extends Object
An item returned by theSortedJoinPipe. Contains the key the join is based on, the left matches and the right matches.- Author:
- Eyal Schneider
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetItemsCount()KgetKey()List<L>getLeft()Map<Integer,List<R>>getRight()LgetSingleLeft()Assumes that there's at most one matching item on left side.RgetSingleRight()Assumes that there's only one right pipe and at most one matching item in it.inthashCode()StringtoString()
-
-
-
Method Detail
-
getKey
public K getKey()
- Returns:
- The key value
-
getSingleLeft
public L getSingleLeft()
Assumes that there's at most one matching item on left side.- Returns:
- The matching item from the left pipe, or null if none.
-
getItemsCount
public int getItemsCount()
- Returns:
- Total number of items matched (from left and right sides)
-
getRight
public Map<Integer,List<R>> getRight()
- Returns:
- The mapping between right pipe index (starting from 0) and the list of matching items. The pipe index is determined by it's position among right side pipes in the join input. Note that the map iteration is ordered by the pipe index value. Pipes with no matches should not be in the map, so lists are guaranteed to be non-empty.
-
getSingleRight
public R getSingleRight()
Assumes that there's only one right pipe and at most one matching item in it.- Returns:
- The matching item from the right pipe, or null if none.
-
-