Package io.memoria.jutils.adapter.yaml
Record YamlMap
java.lang.Object
java.lang.Record
io.memoria.jutils.adapter.yaml.YamlMap
- All Implemented Interfaces:
Yaml
public record YamlMap(io.vavr.collection.Map<java.lang.String,java.lang.Object> map) extends java.lang.Record implements Yaml
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description io.vavr.control.Option<java.lang.Boolean>asBoolean(java.lang.String key)io.vavr.control.Option<io.vavr.collection.List<java.lang.Boolean>>asBooleanList(java.lang.String key)io.vavr.control.Option<java.lang.Double>asDouble(java.lang.String key)io.vavr.control.Option<io.vavr.collection.List<java.lang.Double>>asDoubleList(java.lang.String key)io.vavr.control.Option<java.lang.Integer>asInteger(java.lang.String key)io.vavr.control.Option<io.vavr.collection.List<java.lang.Integer>>asIntegerList(java.lang.String key)io.vavr.control.Option<java.lang.Long>asLong(java.lang.String key)io.vavr.control.Option<io.vavr.collection.List<java.lang.Long>>asLongList(java.lang.String key)io.vavr.control.Option<java.lang.String>asString(java.lang.String key)io.vavr.control.Option<io.vavr.collection.List<java.lang.String>>asStringList(java.lang.String key)io.vavr.control.Option<Yaml>asYaml(java.lang.String key)booleanequals(java.lang.Object o)Indicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.io.vavr.collection.Map<java.lang.String,java.lang.Object>map()Returns the value of themaprecord component.java.lang.StringtoString()Returns a string representation of this record.
-
Constructor Details
-
Method Details
-
asBoolean
public io.vavr.control.Option<java.lang.Boolean> asBoolean(java.lang.String key) -
asBooleanList
public io.vavr.control.Option<io.vavr.collection.List<java.lang.Boolean>> asBooleanList(java.lang.String key)- Specified by:
asBooleanListin interfaceYaml
-
asDouble
public io.vavr.control.Option<java.lang.Double> asDouble(java.lang.String key) -
asDoubleList
public io.vavr.control.Option<io.vavr.collection.List<java.lang.Double>> asDoubleList(java.lang.String key)- Specified by:
asDoubleListin interfaceYaml
-
asInteger
public io.vavr.control.Option<java.lang.Integer> asInteger(java.lang.String key) -
asIntegerList
public io.vavr.control.Option<io.vavr.collection.List<java.lang.Integer>> asIntegerList(java.lang.String key)- Specified by:
asIntegerListin interfaceYaml
-
asLong
public io.vavr.control.Option<java.lang.Long> asLong(java.lang.String key) -
asLongList
public io.vavr.control.Option<io.vavr.collection.List<java.lang.Long>> asLongList(java.lang.String key)- Specified by:
asLongListin interfaceYaml
-
asString
public io.vavr.control.Option<java.lang.String> asString(java.lang.String key) -
asStringList
public io.vavr.control.Option<io.vavr.collection.List<java.lang.String>> asStringList(java.lang.String key)- Specified by:
asStringListin interfaceYaml
-
asYaml
-
toString
public java.lang.String toString()Returns a string representation of this record. The representation contains the name of the type, followed by the name and value of each of the record components.- Specified by:
toStringin classjava.lang.Record- Returns:
- a string representation of this object
-
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.- Specified by:
hashCodein classjava.lang.Record- Returns:
- a hash code value for this object
-
equals
public final boolean equals(java.lang.Object o)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 are compared withObjects::equals(Object,Object).- Specified by:
equalsin classjava.lang.Record- Parameters:
o- the object with which to compare- Returns:
trueif this object is the same as theoargument;falseotherwise.
-
map
public io.vavr.collection.Map<java.lang.String,java.lang.Object> map()Returns the value of themaprecord component.
-