public abstract class BoxResource extends Object
Every API resource has an ID and a BoxAPIConnection
that it uses to communicate with the API. Some
resources also have an associated BoxResource.Info
class that contains information about the resource.
Modifier and Type | Class and Description |
---|---|
class |
BoxResource.Info
Contains information about a BoxResource.
|
Constructor and Description |
---|
BoxResource(BoxAPIConnection api,
String id)
Constructs a BoxResource for a resource with a given ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Indicates whether this BoxResource is equal to another BoxResource.
|
BoxAPIConnection |
getAPI()
Gets the API connection used by this resource.
|
String |
getID()
Gets the ID of this resource.
|
static String |
getResourceType(Class<? extends BoxResource> clazz)
|
int |
hashCode()
Returns a hash code value for this BoxResource.
|
public BoxResource(BoxAPIConnection api, String id)
api
- the API connection to be used by the resource.id
- the ID of the resource.public static String getResourceType(Class<? extends BoxResource> clazz)
clazz
- BoxResource
typeBoxResourceType.value()
public BoxAPIConnection getAPI()
public boolean equals(Object other)