public T advanceToElement(Predicate<T> predicate){
  Node<T> start=head;
  if (head == null)   return null;
  do {
    T currElement=advance();
    if (predicate.test(currElement)) {
      return currElement;
    }
  }
 while (head != start);
  return null;
}

public T advanceToElement ( Predicate < T > predicate ) { Node < T > start = head ; if ( head == null ) return null ; do { T currElement = advance ( ) ; if ( predicate . test ( currElement ) ) { return currElement ; } } while ( head != start ) ; return null ; }
advances through the circular list returning the first element for which the predicate evaluates to true . if there is no such element , returns null leaving the head of the list back in the same place .
