Record Class LList.ImmutableList<T>
java.lang.Object
java.lang.Record
net.tangly.commons.lang.functional.LList.ImmutableList<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.tangly.commons.lang.functional.LList
LList.ImmutableList<T>, LList.LListSplitIterator<T>, LList.Nil<T>
-
Constructor Summary
ConstructorDescriptionImmutableList
(T first, @NotNull LList<T> rest) Creates an instance of aImmutableList
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.first()
Returns the value of thefirst
record component.final int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
Return true if the list is empty otherwise false.rest()
Returns the value of therest
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
ImmutableList
-
-
Method Details
-
isEmpty
-
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)
. -
first
-
rest
-