Package com.smartsheet.api.models
Class ListBuilder<T>
- java.lang.Object
-
- com.smartsheet.api.models.ListBuilder<T>
-
public class ListBuilder<T> extends java.lang.Object
Simple class that makes creating type safe lists of object easier
-
-
Constructor Summary
Constructors Constructor Description ListBuilder()
Default constructorListBuilder(int initialCapacity)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListBuilder<T>
add(java.util.Collection<T> elements)
Adds multiple elements to the listListBuilder<T>
add(T element)
Adds a single element to the listListBuilder<T>
add(T... elements)
Adds multiple elements to the listjava.util.List<T>
build()
Retrieves the built up list of objects
-
-
-
Method Detail
-
add
public ListBuilder<T> add(T element)
Adds a single element to the list- Parameters:
element
- element to add- Returns:
- ListBuilder
-
add
public ListBuilder<T> add(T... elements)
Adds multiple elements to the list- Parameters:
elements
- elements to add- Returns:
- ListBuilder
-
add
public ListBuilder<T> add(java.util.Collection<T> elements)
Adds multiple elements to the list- Parameters:
elements
- elements to add- Returns:
- ListBuilder
-
build
public java.util.List<T> build()
Retrieves the built up list of objects- Returns:
- The build up list of objects
-
-