public class ListBuilder<T> extends Object
| Constructor and Description |
|---|
ListBuilder()
Default constructor
|
ListBuilder(int initialCapacity)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ListBuilder<T> |
add(Collection<T> elements)
Adds multiple elements to the list
|
ListBuilder<T> |
add(T... elements)
Adds multiple elements to the list
|
ListBuilder<T> |
add(T element)
Adds a single element to the list
|
List<T> |
build()
Retrieves the built up list of objects
|
public ListBuilder()
public ListBuilder(int initialCapacity)
initialCapacity - Initial capacity of the internal storage of the list.public ListBuilder<T> add(T element)
element - element to addpublic ListBuilder<T> add(T... elements)
elements - elements to addpublic ListBuilder<T> add(Collection<T> elements)
elements - elements to addCopyright © 2014–2019 Smartsheet. All rights reserved.