Record Class LinkedNode<T>
java.lang.Object
java.lang.Record
dev.pfaff.altargui.util.LinkedNode<T>
-
Constructor Summary
ConstructorsConstructorDescriptionLinkedNode
(T value) LinkedNode
(T value, @Nullable LinkedNode<T> next) Creates an instance of aLinkedNode
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
final boolean
Indicates whether some other object is "equal to" this one.static <T> void
forEach
(@Nullable LinkedNode<T> node, Consumer<T> consumer) void
final int
hashCode()
Returns a hash code value for this object.@Nullable LinkedNode
<T> next()
Returns the value of thenext
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
LinkedNode
-
LinkedNode
Creates an instance of aLinkedNode
record class.- Parameters:
value
- the value for thevalue
record componentnext
- the value for thenext
record component
-
-
Method Details
-
contains
-
forEach
-
forEach
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
next
Returns the value of thenext
record component.- Returns:
- the value of the
next
record component
-