FileDocCategorySizeDatePackage
Removing2.javaAPI DocExample798Sat Sep 12 03:01:00 BST 1998None

Removing2

public class Removing2 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    Deque deque = new Deque();
    deque.add( new Integer( 7 ) );
    deque.add( new Integer( 86 ) );
    deque.add( new Integer( 21 ) );
    deque.add( new Integer( 69 ) );
    System.out.println( "original=" + deque );

    UnaryPredicate predicate = new BindSecondPredicate( new LessNumber(), new Integer( 42 ) );
    ForwardIterator result = Removing.removeIf( deque, predicate );
    System.out.println( "after algo=" + deque );

    deque.remove( result, deque.finish() ); 
    System.out.println( "after remove=" + deque );