| Constructor and Description |
|---|
Resource(String name,
int limit)
Specifies a new resource with the given name and limit.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentUsage()
Returns the current usage of the resource, or
-1 if not
known. |
int |
getLimit()
Returns the resource limit.
|
String |
getName()
Returns the resource name.
|
String |
toString()
Debugging.
|
public Resource(String name, int limit)
name - the resource namelimit - the resource limitpublic String getName()
public int getCurrentUsage()
-1 if not
known.public int getLimit()
Copyright © 2017. All rights reserved.