@InterfaceStability.Evolving public class Resource extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Resource |
CLUSTER
A resource representing the whole cluster.
|
static java.lang.String |
CLUSTER_NAME
The name of the CLUSTER resource.
|
Constructor and Description |
---|
Resource(ResourceType resourceType,
java.lang.String name)
Create an instance of this class with the provided parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isUnknown()
Return true if this Resource has any UNKNOWN components.
|
java.lang.String |
name()
Return the resource name.
|
ResourceType |
resourceType()
Return the resource type.
|
ResourceFilter |
toFilter()
Create a filter which matches only this Resource.
|
java.lang.String |
toString() |
public static final java.lang.String CLUSTER_NAME
public static final Resource CLUSTER
public Resource(ResourceType resourceType, java.lang.String name)
resourceType
- non-null resource typename
- non-null resource namepublic ResourceType resourceType()
public java.lang.String name()
public ResourceFilter toFilter()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isUnknown()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object