Package ru.tinkoff.kora.config.common
Record Class ConfigValue.ArrayValue
java.lang.Object
java.lang.Record
ru.tinkoff.kora.config.common.ConfigValue.ArrayValue
- All Implemented Interfaces:
Iterable<ConfigValue<?>>,ConfigValue<List<ConfigValue<?>>>
- Enclosing interface:
- ConfigValue<T>
public static record ConfigValue.ArrayValue(ConfigValueOrigin origin, List<ConfigValue<?>> value)
extends Record
implements ConfigValue<List<ConfigValue<?>>>, Iterable<ConfigValue<?>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.tinkoff.kora.config.common.ConfigValue
ConfigValue.ArrayValue, ConfigValue.BooleanValue, ConfigValue.NullValue, ConfigValue.NumberValue, ConfigValue.ObjectValue, ConfigValue.StringValue -
Constructor Summary
ConstructorsConstructorDescriptionArrayValue(ConfigValueOrigin origin, List<ConfigValue<?>> value) Creates an instance of aArrayValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.ConfigValue<?>get(int i) final inthashCode()Returns a hash code value for this object.Iterator<ConfigValue<?>>iterator()origin()Returns the value of theoriginrecord component.toString()Returns a string representation of this record class.List<ConfigValue<?>>value()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ru.tinkoff.kora.config.common.ConfigValue
asArray, asBoolean, asNumber, asObject, asString, isNullMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArrayValue
Creates an instance of aArrayValuerecord class.- Parameters:
origin- the value for theoriginrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
get
-
iterator
- Specified by:
iteratorin interfaceIterable<ConfigValue<?>>
-
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). -
origin
Returns the value of theoriginrecord component.- Specified by:
originin interfaceConfigValue<List<ConfigValue<?>>>- Returns:
- the value of the
originrecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceConfigValue<List<ConfigValue<?>>>- Returns:
- the value of the
valuerecord component
-