FileDocCategorySizeDatePackage
DList3.javaAPI DocExample843Sat Sep 12 03:01:00 BST 1998None

DList3

public class DList3 extends Object
Insertion.
see
com.objectspace.jgl.DList
version
3.0.0
author
ObjectSpace, Inc.

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

    DList dlist = new DList();
    dlist.add( "bat" );
    dlist.add( "cat" );
    dlist.add( "dog" );
    System.out.println( "dlist = " + dlist );
    System.out.println();

    dlist.insert( dlist.begin(), "ape" );
    System.out.println( "After insert at begin = " + dlist );

    dlist.insert( dlist.end(), "emu" );
    System.out.println( "After insert at end = " + dlist );

    DListIterator i = dlist.begin();
    i.advance( 3 );
    dlist.insert( i, 2, "fox" );
    System.out.println( "After dlist.insert( i, 2, fox ) = " + dlist );