org.zkoss.util
Class CollectionsX.OneCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by org.zkoss.util.CollectionsX.OneCollection
All Implemented Interfaces:
Iterable, Collection
Enclosing class:
CollectionsX

public static final class CollectionsX.OneCollection
extends AbstractCollection

A collection that contains only one element.


Constructor Summary
CollectionsX.OneCollection(Object one)
           
 
Method Summary
 Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

CollectionsX.OneCollection

public CollectionsX.OneCollection(Object one)
Method Detail

size

public final int size()
Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in class AbstractCollection


Copyright © 2011. All Rights Reserved.