public class ProfileRequirements extends java.lang.Object implements java.lang.Comparable<ProfileRequirements>
Constructor and Description |
---|
ProfileRequirements() |
ProfileRequirements(java.lang.String profile) |
ProfileRequirements(java.lang.String profile,
java.lang.Integer minimumInstances) |
ProfileRequirements(java.lang.String profile,
java.lang.Integer minimumInstances,
java.lang.Integer maximumInstances) |
ProfileRequirements(java.lang.String profile,
java.lang.Integer minimumInstances,
java.lang.Integer maximumInstances,
java.util.List<java.lang.String> dependentProfiles) |
ProfileRequirements(java.lang.String profile,
java.lang.Integer minimumInstances,
java.lang.Integer maximumInstances,
java.lang.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(java.lang.Object o) |
java.util.List<java.lang.String> |
getDependentProfiles() |
double |
getHealth(int instances)
Returns the health as a percentage for tools based on the current number of instances and the requirements
|
java.lang.Integer |
getMaximumInstances() |
java.lang.Integer |
getMinimumInstances() |
java.lang.String |
getProfile() |
int |
hashCode() |
boolean |
hasMinimumInstances()
Returns true if this profile requirements has at least 1
getMinimumInstances() |
protected static boolean |
isEmpty(java.util.Collection<?> coll) |
protected static boolean |
isEmpty(java.lang.Integer number) |
void |
setDependentProfiles(java.util.List<java.lang.String> dependentProfiles) |
void |
setMaximumInstances(java.lang.Integer maximumInstances) |
void |
setMinimumInstances(java.lang.Integer minimumInstances) |
void |
setProfile(java.lang.String profile) |
java.lang.String |
toString() |
public ProfileRequirements()
public ProfileRequirements(java.lang.String profile)
public ProfileRequirements(java.lang.String profile, java.lang.Integer minimumInstances)
public ProfileRequirements(java.lang.String profile, java.lang.Integer minimumInstances, java.lang.Integer maximumInstances)
public ProfileRequirements(java.lang.String profile, java.lang.Integer minimumInstances, java.lang.Integer maximumInstances, java.util.List<java.lang.String> dependentProfiles)
public ProfileRequirements(java.lang.String profile, java.lang.Integer minimumInstances, java.lang.Integer maximumInstances, java.lang.String... dependentProfiles)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(ProfileRequirements o)
compareTo
in interface java.lang.Comparable<ProfileRequirements>
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getProfile()
public void setProfile(java.lang.String profile)
public java.util.List<java.lang.String> getDependentProfiles()
public void setDependentProfiles(java.util.List<java.lang.String> dependentProfiles)
public java.lang.Integer getMaximumInstances()
public void setMaximumInstances(java.lang.Integer maximumInstances)
public java.lang.Integer getMinimumInstances()
public void setMinimumInstances(java.lang.Integer minimumInstances)
public double getHealth(int instances)
public boolean checkIsEmpty()
protected static boolean isEmpty(java.lang.Integer number)
protected static boolean isEmpty(java.util.Collection<?> coll)
public boolean hasMinimumInstances()
getMinimumInstances()
Copyright © 2016 Red Hat. All Rights Reserved.