org.kuali.rice.krms.api.repository
Class BuilderUtils

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.BuilderUtils

public class BuilderUtils
extends Object

Utilities for implementing ModelBuilders more easily.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
static interface BuilderUtils.Transformer<A,B>
           
 
Constructor Summary
BuilderUtils()
           
 
Method Summary
static
<B> List<B>
convertFromBuilderList(List<? extends ModelBuilder> toConvert)
           
static
<B> Set<B>
convertFromBuilderSet(Set<? extends ModelBuilder> toConvert)
           
static
<A,B> List<B>
transform(List<? extends A> toConvert, BuilderUtils.Transformer<A,B> xform)
          This method is useful for converting a List<? extends BlahContract> to a List<Blah.Builder>.
static
<A,B> Set<B>
transform(Set<? extends A> toConvert, BuilderUtils.Transformer<A,B> xform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderUtils

public BuilderUtils()
Method Detail

convertFromBuilderList

public static <B> List<B> convertFromBuilderList(List<? extends ModelBuilder> toConvert)

convertFromBuilderSet

public static <B> Set<B> convertFromBuilderSet(Set<? extends ModelBuilder> toConvert)

transform

public static <A,B> List<B> transform(List<? extends A> toConvert,
                                      BuilderUtils.Transformer<A,B> xform)
This method is useful for converting a List<? extends BlahContract> to a List<Blah.Builder>. You'll just need to implement Transformer to use it.

Type Parameters:
A -
B -
Parameters:
toConvert -
xform -
Returns:

transform

public static <A,B> Set<B> transform(Set<? extends A> toConvert,
                                     BuilderUtils.Transformer<A,B> xform)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.