protected Tuple loadEqualTupleGroup(PushBackStream stream,LinkedList<Tuple> group,StreamComparator groupComparator) throws IOException {
  Tuple firstMember=stream.read();
  if (!firstMember.EOF) {
    group.add(firstMember);
    BREAKPOINT:     while (true) {
      Tuple nMember=stream.read();
      if (!nMember.EOF && 0 == groupComparator.compare(firstMember,nMember)) {
        group.add(nMember);
      }
 else {
        stream.pushBack(nMember);
        break BREAKPOINT;
      }
    }
  }
  return firstMember;
}

protected Tuple loadEqualTupleGroup ( PushBackStream stream , LinkedList < Tuple > group , StreamComparator groupComparator ) throws IOException { Tuple firstMember = stream . read ( ) ; if ( ! firstMember . EOF ) { group . add ( firstMember ) ; BREAKPOINT : while ( true ) { Tuple nMember = stream . read ( ) ; if ( ! nMember . EOF && 0 == groupComparator . compare ( firstMember , nMember ) ) { group . add ( nMember ) ; } else { stream . pushBack ( nMember ) ; break BREAKPOINT ; } } } return firstMember ; }
given the stream , start from beginning and load group with all tuples that are equal to the first in stream ( including the first one in the stream ) . all matched tuples are removed from the stream . result is at least one tuple will be read from the stream and 0 or more tuples will exist in the group . if the first tuple is eof then the group will have 0 items . else it will have at least one item . the first group member is returned .
