|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.api.mo.ModelObjectUtils
public class ModelObjectUtils
A set of simple utilities to assist with common idioms in immutable model objects and their builders.
Method Summary | ||
---|---|---|
static
|
buildImmutableCopy(List<? extends ModelBuilder> builderList)
Takes the given list of ModelBuilder objects and invokes the
ModelBuilder.build() method on each of them, adding them to a new list and
return an unmodifiable copy. |
|
static
|
createImmutableCopy(List<T> listToCopy)
Takes the given list and returns an unmodifiable copy of that list containing the same elements as the original list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> List<T> buildImmutableCopy(List<? extends ModelBuilder> builderList)
ModelBuilder
objects and invokes the
ModelBuilder.build()
method on each of them, adding them to a new list and
return an unmodifiable copy. If the given list is empty or null, will return an empty and unmodifiable list.
T
- the type of the object that is built by the builders in the list, it is up to the caller of this
method to ensure they define the proper parameterized list for the return type.builderList
- the list of builders to build and add to resulting list, may be empty or null
public static <T> List<T> createImmutableCopy(List<T> listToCopy)
T
- the type of the elements in the given listlistToCopy
- the list to copy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |