public class ResourceConsumerId
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
ResourceConsumerId() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
consumerClass()
Returns class name of the consumer.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isClassOf(java.lang.Class<?> cls)
Checks if the consumer is an instance of given class.
|
static <T extends ResourceConsumer> |
of(long value,
java.lang.Class<T> cls)
Creates ResourceConsumerId from given value and class.
|
static <T extends Identifier<java.lang.Long> & ResourceConsumer> |
of(T id)
Creates ResourceConsumerId instance from Identifier object.
|
long |
value()
Returns ID value.
|
public boolean isClassOf(java.lang.Class<?> cls)
cls
- class objectpublic java.lang.String consumerClass()
public long value()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static <T extends ResourceConsumer> ResourceConsumerId of(long value, java.lang.Class<T> cls)
T
- resource consumer class typevalue
- ID value unique within the given classcls
- class of ResourceConsumer implementationpublic static <T extends Identifier<java.lang.Long> & ResourceConsumer> ResourceConsumerId of(T id)
T
- resource consumer class typeid
- identifier object backed by Long value