Record Class TreePreviewNode
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.preview.TreePreviewNode
@API(status=STABLE,
since="2.0.0-beta.4")
public record TreePreviewNode(ResourceKey resource, long amount, long toCraft, long available, long missing, List<TreePreviewNode> children)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTreePreviewNode
(ResourceKey resource, long amount, long toCraft, long available, long missing, List<TreePreviewNode> children) Creates an instance of aTreePreviewNode
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
amount()
Returns the value of theamount
record component.long
Returns the value of theavailable
record component.children()
Returns the value of thechildren
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
missing()
Returns the value of themissing
record component.resource()
Returns the value of theresource
record component.long
toCraft()
Returns the value of thetoCraft
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TreePreviewNode
public TreePreviewNode(ResourceKey resource, long amount, long toCraft, long available, long missing, List<TreePreviewNode> children) Creates an instance of aTreePreviewNode
record class.- Parameters:
resource
- the value for theresource
record componentamount
- the value for theamount
record componenttoCraft
- the value for thetoCraft
record componentavailable
- the value for theavailable
record componentmissing
- the value for themissing
record componentchildren
- the value for thechildren
record component
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
amount
public long amount()Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-
toCraft
public long toCraft()Returns the value of thetoCraft
record component.- Returns:
- the value of the
toCraft
record component
-
available
public long available()Returns the value of theavailable
record component.- Returns:
- the value of the
available
record component
-
missing
public long missing()Returns the value of themissing
record component.- Returns:
- the value of the
missing
record component
-
children
Returns the value of thechildren
record component.- Returns:
- the value of the
children
record component
-