public class ResourceMinimalImpl<T> extends Object implements ResourceModel<T>
This is a minimal internal implementation! It should stay so to ensure that this implementations doesn't constrain the implementation.
Note! This Object is immutable!| Constructor and Description |
|---|
ResourceMinimalImpl(String resourceID,
Identification provider,
T t,
Identification consumer)
creates a new Resource.
|
| Modifier and Type | Method and Description |
|---|---|
Identification |
getConsumer()
returns the consumer of the object (if set).
|
String |
getID()
An ID must always be unique.
|
Identification |
getProvider()
returns the provider of the Resource.
|
T |
getResource()
returns the associated Resource data if set.
|
String |
getResourceID()
returns the ID of the Resource.
|
boolean |
hasProvider()
returns whether a provider is set
|
ResourceMinimalImpl<T> |
setResource(T resource)
sets the Resource data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOwnerpublic ResourceMinimalImpl(String resourceID, Identification provider, T t, Identification consumer)
resourceID - the ID of the Resourceprovider - the Provider of the Resourcet - the resourceconsumer - the ID of the Consumerpublic T getResource()
getResource in interface ResourceModel<T>public ResourceMinimalImpl<T> setResource(T resource)
Note! this Object is immutable!
resource - the data to setpublic String getResourceID()
getResourceID in interface ResourceModel<T>public Identification getProvider()
getProvider in interface ResourceModel<T>public boolean hasProvider()
hasProvider in interface ResourceModel<T>public Identification getConsumer()
getConsumer in interface ResourceModel<T>public String getID()
getID in interface IdentifiableCopyright © 2016. All rights reserved.