Package com.globalmentor.net
Class AbstractValueResource<V>
java.lang.Object
com.globalmentor.net.AbstractValueResource<V>
- Type Parameters:
V
- The type of value represented by the resource.
- All Implemented Interfaces:
Resource
,ValueResource<V>
- Direct Known Subclasses:
DefaultValueResource
An abstract implementation of a resource that represents some value object instance.
This implementation provides no representation of URI, on the basis that many implementations may wish to dynamically generate a URI based upon the value being held.
- Author:
- Garret Wilson
-
Constructor Details
-
AbstractValueResource
Constructor.- Parameters:
valueClass
- The class representing the type of value represented by the resource.value
- The non-null
value represented by the resource.- Throws:
NullPointerException
- if the given value class and/or value isnull
.
-
-
Method Details
-
getValueClass
- Specified by:
getValueClass
in interfaceValueResource<V>
- Returns:
- The class representing the type of value represented by the resource.
-
getValue
- Specified by:
getValue
in interfaceValueResource<V>
- Returns:
- The non-
null
value represented by the resource.
-