Package com.yahoo.config.provision
Record Class NodeResources.GpuResources
java.lang.Object
java.lang.Record
com.yahoo.config.provision.NodeResources.GpuResources
- Enclosing class:
- NodeResources
-
Constructor Summary
ConstructorDescriptionGpuResources
(int count, double memoryGb) Creates an instance of aGpuResources
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
count()
Returns the value of thecount
record component.boolean
Indicates whether some other object is "equal to" this one.static NodeResources.GpuResources
Returns zero gpu resources.int
hashCode()
Returns a hash code value for this object.boolean
boolean
isZero()
double
memoryGb()
Returns the value of thememoryGb
record component.minus
(NodeResources.GpuResources other) plus
(NodeResources.GpuResources other) final String
toString()
Returns a string representation of this record class.static NodeResources.GpuResources
zero()
-
Constructor Details
-
GpuResources
public GpuResources(int count, double memoryGb) Creates an instance of aGpuResources
record class.- Parameters:
count
- the value for thecount
record componentmemoryGb
- the value for thememoryGb
record component
-
-
Method Details
-
isZero
public boolean isZero() -
zero
-
isDefault
public boolean isDefault() -
getDefault
Returns zero gpu resources. -
plus
-
minus
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-
memoryGb
public double memoryGb()Returns the value of thememoryGb
record component.- Returns:
- the value of the
memoryGb
record component
-