Package ch.njol.skript.lang
Record Class KeyedValue.UnzippedKeyValues<T>
java.lang.Object
java.lang.Record
ch.njol.skript.lang.KeyedValue.UnzippedKeyValues<T>
- Type Parameters:
T
- The type of the values in the list.- Record Components:
keys
- A list of keys extracted from theKeyedValue
s.values
- A list of values extracted from theKeyedValue
s.
- Enclosing class:
KeyedValue<T>
public static record KeyedValue.UnzippedKeyValues<T>(@NotNull List<@NotNull String> keys, @NotNull List<@NotNull T> values)
extends Record
A record that represents a pair of lists: one for keys and one for values.
This is used to store the result of unzipping
Both lists are guaranteed to be of the same length, and each key corresponds to the value at the same index.
If the keys are not provided, numerical indices (1, 2, 3, ..., n) are used as keys.
KeyedValue
s into separate lists.
Both lists are guaranteed to be of the same length, and each key corresponds to the value at the same index.
If the keys are not provided, numerical indices (1, 2, 3, ..., n) are used as keys.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnzippedKeyValues
(@NotNull String @Nullable [] keys, T @NotNull [] values) UnzippedKeyValues
(@Nullable List<@NotNull String> keys, @NotNull List<@NotNull T> values) Creates an instance of aUnzippedKeyValues
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.keys()
Returns the value of thekeys
record component.final String
toString()
Returns a string representation of this record class.values()
Returns the value of thevalues
record component.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
keys
Returns the value of thekeys
record component.- Returns:
- the value of the
keys
record component
-
values
Returns the value of thevalues
record component.- Returns:
- the value of the
values
record component
-