com.vaadin.signals.
Record Class ListSignal.ListPosition
Record Components:
after
- id of the node to insert immediately after, or
null
to not define a constraint
before
- id of the node to insert immediately before, or
null
to not define a constraint
Enclosing class:
A list insertion position before and/or after the referenced entries. If
both entries are defined, then this position represents an exact match
that is valid only if the two entries are adjacent. If only one is
defined, then the position is relative to only that position. A position
with neither reference is not valid for inserts but it is valid to test a
parent-child relationship regardless of the child position.
Id.ZERO
represents the edge of the list, i.e. the first or the
last position.
-
Constructor Summary
ConstructorsConstructorDescriptionListPosition
(Id after, Id before) Creates an instance of a
ListPosition
record class. -
Method Summary
Modifier and TypeMethodDescriptionafter()
Returns the value of the
after
record component.static ListSignal.ListPosition
Gets the insertion position immediately after the given signal.
before()
Returns the value of the
before
record component.static ListSignal.ListPosition
Gets the insertion position immediately before the given signal.
static ListSignal.ListPosition
Gets the insertion position between the given signals, assuming those signals are currently adjacent.
final boolean
Indicates whether some other object is "equal to" this one.
static ListSignal.ListPosition
first()
Gets the insertion position that corresponds to the beginning of the list.
final int
hashCode()
Returns a hash code value for this object.
static ListSignal.ListPosition
last()
Gets the insertion position that corresponds to the end of the list.
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
first
Gets the insertion position that corresponds to the beginning of the list.
Returns:
a list position for the beginning of the list, not
null
-
last
Gets the insertion position that corresponds to the end of the list.
Returns:
a list position for the end of the list, not
null
-
after
Gets the insertion position immediately after the given signal. Inserting after
null
is interpreted as inserting after the start of the list, i.e. as the first child.Parameters:
after
- the signal to insert after, ornull
to insert firstReturns:
a list position after the given signal, not
null
-
before
Gets the insertion position immediately before the given signal. Inserting before
null
signal is interpreted as inserting before the end of the list, i.e. as the last child.Parameters:
before
- the signal to insert before, ornull
to insert lastReturns:
a list position after the given signal, not
null
-
between
Gets the insertion position between the given signals, assuming those signals are currently adjacent. Inserting after
null
is interpreted as inserting after the start of the list, i.e. as the first child. Inserting beforenull
signal is interpreted as inserting before the end of the list, i.e. as the last child.Parameters:
after
- the signal to insert after, ornull
to insert firstbefore
- the signal to insert before, ornull
to insert lastReturns:
a list position between the given signals, not
null
-
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. All components in this record class are compared with
Objects::equals(Object,Object)
. -
after
Returns the value of the
after
record component.Returns:
the value of the
after
record component -
before
Returns the value of the
before
record component.Returns:
the value of the
before
record component
-