Class Resource
- All Implemented Interfaces:
Serializable,Cloneable
Describes the resources available for a container instance.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanWhen thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.When theintegerValuetype is set, the value of the resource must be an integer.When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.getName()The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.When thestringSetValuetype is set, the value of the resource must be a string type.getType()The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.inthashCode()voidsetDoubleValue(Double doubleValue) When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.voidsetIntegerValue(Integer integerValue) When theintegerValuetype is set, the value of the resource must be an integer.voidsetLongValue(Long longValue) When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.voidThe name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.voidsetStringSetValue(Collection<String> stringSetValue) When thestringSetValuetype is set, the value of the resource must be a string type.voidThe type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.toString()Returns a string representation of this object; useful for testing and debugging.withDoubleValue(Double doubleValue) When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.withIntegerValue(Integer integerValue) When theintegerValuetype is set, the value of the resource must be an integer.withLongValue(Long longValue) When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.withStringSetValue(String... stringSetValue) When thestringSetValuetype is set, the value of the resource must be a string type.withStringSetValue(Collection<String> stringSetValue) When thestringSetValuetype is set, the value of the resource must be a string type.The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.
-
Constructor Details
-
Resource
public Resource()
-
-
Method Details
-
setName
The name of the resource, such as
CPU,MEMORY,PORTS, or a user-defined resource.- Parameters:
name- The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.
-
getName
The name of the resource, such as
CPU,MEMORY,PORTS, or a user-defined resource.- Returns:
- The name of the resource, such as
CPU,MEMORY,PORTS, or a user-defined resource.
-
withName
The name of the resource, such as
CPU,MEMORY,PORTS, or a user-defined resource.- Parameters:
name- The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setType
The type of the resource, such as
INTEGER,DOUBLE,LONG, orSTRINGSET.- Parameters:
type- The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.
-
getType
The type of the resource, such as
INTEGER,DOUBLE,LONG, orSTRINGSET.- Returns:
- The type of the resource, such as
INTEGER,DOUBLE,LONG, orSTRINGSET.
-
withType
The type of the resource, such as
INTEGER,DOUBLE,LONG, orSTRINGSET.- Parameters:
type- The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDoubleValue
When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue- When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.
-
getDoubleValue
When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Returns:
- When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.
-
withDoubleValue
When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue- When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLongValue
When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue- When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.
-
getLongValue
When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Returns:
- When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.
-
withLongValue
When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue- When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIntegerValue
When the
integerValuetype is set, the value of the resource must be an integer.- Parameters:
integerValue- When theintegerValuetype is set, the value of the resource must be an integer.
-
getIntegerValue
When the
integerValuetype is set, the value of the resource must be an integer.- Returns:
- When the
integerValuetype is set, the value of the resource must be an integer.
-
withIntegerValue
When the
integerValuetype is set, the value of the resource must be an integer.- Parameters:
integerValue- When theintegerValuetype is set, the value of the resource must be an integer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getStringSetValue
When the
stringSetValuetype is set, the value of the resource must be a string type.- Returns:
- When the
stringSetValuetype is set, the value of the resource must be a string type.
-
setStringSetValue
When the
stringSetValuetype is set, the value of the resource must be a string type.- Parameters:
stringSetValue- When thestringSetValuetype is set, the value of the resource must be a string type.
-
withStringSetValue
When the
stringSetValuetype is set, the value of the resource must be a string type.NOTE: This method appends the values to the existing list (if any). Use
setStringSetValue(java.util.Collection)orwithStringSetValue(java.util.Collection)if you want to override the existing values.- Parameters:
stringSetValue- When thestringSetValuetype is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStringSetValue
When the
stringSetValuetype is set, the value of the resource must be a string type.- Parameters:
stringSetValue- When thestringSetValuetype is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-