Package rs.baselib.test
Class BuilderUtils
java.lang.Object
rs.baselib.test.BuilderUtils
public class BuilderUtils
extends java.lang.Object
Helps using the builder pattern.
- Author:
- ralph
-
Constructor Summary
Constructors Constructor Description BuilderUtils() -
Method Summary
Modifier and Type Method Description static DateTimePeriodBuilder$DateTimePeriod()Returns theDateTimePeriodBuilder factory.static IntBuilder$Int()Returns the Integer Builder factory.static LongBuilder$Long()Returns the Long Builder factory.static RsDateBuilder$RsDate()Returns theRsDateBuilder factory.static RsDayBuilder$RsDay()Returns theRsDayBuilder factory.static RsMonthBuilder$RsMonth()Returns theRsMonthBuilder factory.static RsYearBuilder$RsYear()Returns theRsYearBuilder factory.static StringBuilder$String()Returns the String Builder factory.static <T> java.util.List<T>listOf(int count, Builder<T> builder)Returns a list of objects.static <T> Tsome(Builder<T> builder)Return any object.
-
Constructor Details
-
BuilderUtils
public BuilderUtils()
-
-
Method Details
-
some
Return any object.- Type Parameters:
T- type of object to be built- Parameters:
builder- the builder to be used- Returns:
- the object built
-
listOf
Returns a list of objects.- Type Parameters:
T- type of objects to be built- Parameters:
count- the number of objects to createbuilder- the builder to be used- Returns:
- the list of objects built
-
$String
Returns the String Builder factory.- Returns:
- the builder for strings.
-
$Int
Returns the Integer Builder factory.- Returns:
- the builder for integers.
-
$Long
Returns the Long Builder factory.- Returns:
- the builder for long integers.
-
$RsDate
Returns theRsDateBuilder factory.- Returns:
- the builder for
RsDate
-
$RsDay
Returns theRsDayBuilder factory.- Returns:
- the builder for
RsDay
-
$RsMonth
Returns theRsMonthBuilder factory.- Returns:
- the builder for
RsMonth
-
$RsYear
Returns theRsYearBuilder factory.- Returns:
- the builder for
RsYear
-
$DateTimePeriod
Returns theDateTimePeriodBuilder factory.- Returns:
- the builder for
DateTimePeriod
-