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 theKeyedValues.values- A list of values extracted from theKeyedValues.
- 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.
KeyedValues 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 aUnzippedKeyValuesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keys()Returns the value of thekeysrecord component.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord 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 thekeysrecord component.- Returns:
- the value of the
keysrecord component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-