public class ProfileRequirements extends Object implements Comparable<ProfileRequirements>
| Constructor and Description |
|---|
ProfileRequirements() |
ProfileRequirements(String profile) |
ProfileRequirements(String profile,
Integer minimumInstances) |
ProfileRequirements(String profile,
Integer minimumInstances,
Integer maximumInstances) |
ProfileRequirements(String profile,
Integer minimumInstances,
Integer maximumInstances,
List<String> dependentProfiles) |
ProfileRequirements(String profile,
Integer minimumInstances,
Integer maximumInstances,
String... dependentProfiles) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIsEmpty()
Returns true if these requirements are empty (and so do not need to be persisted)
|
int |
compareTo(ProfileRequirements o) |
boolean |
equals(Object o) |
List<String> |
getDependentProfiles() |
double |
getHealth(int instances)
Returns the health as a percentage for tools based on the current number of instances and the requirements
|
Integer |
getMaximumInstances() |
Integer |
getMinimumInstances() |
String |
getProfile() |
int |
hashCode() |
boolean |
hasMinimumInstances()
Returns true if this profile requirements has at least 1
getMinimumInstances() |
protected static boolean |
isEmpty(Collection<?> coll) |
protected static boolean |
isEmpty(Integer number) |
void |
setDependentProfiles(List<String> dependentProfiles) |
void |
setMaximumInstances(Integer maximumInstances) |
void |
setMinimumInstances(Integer minimumInstances) |
void |
setProfile(String profile) |
String |
toString() |
public ProfileRequirements()
public ProfileRequirements(String profile)
public ProfileRequirements(String profile, Integer minimumInstances, Integer maximumInstances)
public ProfileRequirements(String profile, Integer minimumInstances, Integer maximumInstances, List<String> dependentProfiles)
public int compareTo(ProfileRequirements o)
compareTo in interface Comparable<ProfileRequirements>public String getProfile()
public void setProfile(String profile)
public Integer getMaximumInstances()
public void setMaximumInstances(Integer maximumInstances)
public Integer getMinimumInstances()
public void setMinimumInstances(Integer minimumInstances)
public double getHealth(int instances)
public boolean checkIsEmpty()
protected static boolean isEmpty(Integer number)
protected static boolean isEmpty(Collection<?> coll)
public boolean hasMinimumInstances()
getMinimumInstances()Copyright © 2011–2014 Red Hat. All rights reserved.