| Modifier and Type | Method and Description | 
|---|---|
ContinuousResource | 
child(Class<?> child,
     double value)
Returns a child resource of this instance with specifying a child object and
 value. 
 | 
DiscreteResource | 
child(Object child)
Returns a child resource of this instance with specifying the child object. 
 | 
boolean | 
equals(Object obj)  | 
int | 
hashCode()  | 
ContinuousResourceId | 
id()
Returns the ID of this resource. 
 | 
boolean | 
isSubTypeOf(Class<?> ancestor)
Checks if the type of this instance is the sub-type of the specified type. 
 | 
boolean | 
isTypeOf(Class<?> type)
Checks if the type of this instance is the specified type. 
 | 
Optional<DiscreteResource> | 
parent()
Returns the parent resource of this instance. 
 | 
String | 
simpleTypeName()
Returns the simple type name of this resource. 
 | 
String | 
toString()  | 
double | 
value()
Returns the value of the resource amount. 
 | 
<T> Optional<T> | 
valueAs(Class<T> type)
Returns value interpreted as the specified type. 
 | 
public ContinuousResourceId id()
Resourcepublic String simpleTypeName()
ResourcesimpleTypeName in interface Resourcepublic boolean isTypeOf(Class<?> type)
Resourcepublic double value()
public boolean isSubTypeOf(Class<?> ancestor)
ResourceisSubTypeOf in interface Resourceancestor - type of resource to be checked.public <T> Optional<T> valueAs(Class<T> type)
public DiscreteResource child(Object child)
ResourceUnsupportedOperationException is thrown. If the given
 object is a Class instance, IllegalArgumentException is thrown.public ContinuousResource child(Class<?> child, double value)
ResourceUnsupportedOperationException is thrown.public Optional<DiscreteResource> parent()
Resource