站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

CollectionBuilder - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.common.util
Class CollectionBuilder

java.lang.Object
  extended byorg.jboss.portal.common.util.CollectionBuilder

public class CollectionBuilder
extends java.lang.Object

An helper to build collection of object in a simple manner.


Constructor Summary
CollectionBuilder()
           
 
Method Summary
 CollectionBuilder add(java.lang.Object o)
          Add the object to the collection.
 CollectionBuilder addAll(java.util.Collection all)
          Add all the objects to the collection.
 java.util.ArrayList toArrayList()
          Return a list build from the collection.
 java.util.HashSet toHashSet()
          Return a set build from the collection.
 java.util.LinkedList toLinkedList()
          Return a list build from the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionBuilder

public CollectionBuilder()
Method Detail

add

public CollectionBuilder add(java.lang.Object o)
Add the object to the collection.

Parameters:
o - the object to add
Returns:
the builder

addAll

public CollectionBuilder addAll(java.util.Collection all)
Add all the objects to the collection.

Parameters:
all - the objects to add
Returns:
the builder

toHashSet

public java.util.HashSet toHashSet()
Return a set build from the collection.

Returns:
a set

toArrayList

public java.util.ArrayList toArrayList()
Return a list build from the collection.

Returns:
a list

toLinkedList

public java.util.LinkedList toLinkedList()
Return a list build from the collection.

Returns:
a list