FileDocCategorySizeDatePackage
SList3.javaAPI DocExample827Sat Sep 12 03:01:00 BST 1998None

SList3

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

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

    SList list = new SList();
    list.add( "bat" );
    list.add( "cat" );
    list.add( "dog" );
    System.out.println( "list = " + list );
    System.out.println();

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

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

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