Class JoinRecord<K,​L,​R>

  • Type Parameters:
    K - The key type
    L - The type of 'left' values
    R - The type of 'right' values

    public class JoinRecord<K,​L,​R>
    extends Object
    An item returned by the SortedJoinPipe. Contains the key the join is based on, the left matches and the right matches.
    Author:
    Eyal Schneider
    • Method Detail

      • getKey

        public K getKey()
        Returns:
        The key value
      • getLeft

        public List<L> getLeft()
        Returns:
        The list of matching items from the left pipe
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object