YARN-6118. Add javadoc for Resources.isNone. Contributed by Andres Perez.

(cherry picked from commit 3a0a0a485a)
This commit is contained in:
Sunil G 2017-02-10 15:48:46 +05:30
parent e259a818ad
commit 7b2b6caf12
1 changed files with 6 additions and 0 deletions

View File

@ -144,6 +144,12 @@ public static Resource none() {
return NONE;
}
/**
* Check whether a resource object is empty (0 memory and 0 virtual cores).
* @param other The resource to check
* @return {@code true} if {@code other} has 0 memory and 0 virtual cores,
* {@code false} otherwise
*/
public static boolean isNone(Resource other) {
return NONE.equals(other);
}