T
- typepublic class Data<T> extends Object
Constructor and Description |
---|
Data(Collection<T> values)
Constructor.
|
Data(Collection<T> values,
RelationshipType relationshipType)
Constructor.
|
Data(io.reactivex.Observable<T> values)
Constructor.
|
Data(io.reactivex.Observable<T> values,
RelationshipType relationshipType)
Constructor.
|
Data(T value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Collection<T> |
get() |
T |
getSingleValue()
Fetch the item if the data is toOne.
|
boolean |
isToOne()
Determine whether or not the contained type is toOne.
|
void |
sort(Comparator<T> sortFunction)
Sort method using provided sort function.
|
Collection<ResourceIdentifier> |
toResourceIdentifiers() |
public Data(T value)
value
- singleton resourcepublic Data(io.reactivex.Observable<T> values)
values
- List of resourcespublic Data(io.reactivex.Observable<T> values, RelationshipType relationshipType)
values
- List of resourcesrelationshipType
- toOne or toManypublic Data(Collection<T> values)
values
- List of resourcespublic Data(Collection<T> values, RelationshipType relationshipType)
values
- List of resourcesrelationshipType
- toOne or toManypublic void sort(Comparator<T> sortFunction)
sortFunction
- comparator to sort data withpublic Collection<T> get()
public boolean isToOne()
public T getSingleValue()
IllegalAccessError
- when the data is not toOnepublic Collection<ResourceIdentifier> toResourceIdentifiers()
Copyright © 2015–2021 Yahoo! Inc.. All rights reserved.