org.mortbay.util

Class SingletonList


public class SingletonList
extends AbstractList

Singleton List. This simple efficient implementation of a List with a single element is provided for JDK 1.2 JVMs, which do not provide the Collections.singletonList method.
Version:
$Revision: 1.3 $
Author:
Greg Wilkins (gregw)

Method Summary

Object
get(int i)
Iterator
iterator()
ListIterator
listIterator()
ListIterator
listIterator(int i)
static SingletonList
newSingletonList(Object o)
int
size()

Method Details

get

public Object get(int i)

iterator

public Iterator iterator()

listIterator

public ListIterator listIterator()

listIterator

public ListIterator listIterator(int i)

newSingletonList

public static SingletonList newSingletonList(Object o)

size

public int size()

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.