public class Datasources extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Datasource<? extends T> |
empty()
Returns an empty datasource (immutable).
|
public static <T> Datasource<? extends T> empty()
This example illustrates the type-safe way to obtain an empty datasource:
Datasource<String> s = Datasources.empty();
Implementation note: Implementations of this method need not
create a separate Datasource object for each call. Using this
method is likely to have comparable cost to using the like-named
field. (Unlike this method, the field does not provide type safety.)T - type of elements, if there were any, in the datasource.EMPTY_DATASOURCE