YamlMapping

shampoo.yaml.YamlMapping
sealed trait YamlMapping extends YamlCollection

Defines YAML mapping.

Attributes

See also
Graph
Supertypes
trait YamlNode
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def apply(key: String): YamlNode

Gets node.

Gets node.

Value parameters

key

mapping key

Attributes

Throws
java.util.NoSuchElementException

if key or value does not exist

def contains(key: String): Boolean

Tests for key.

Tests for key.

Value parameters

key

mapping key

Attributes

def keys: Set[String]

Gets keys.

Gets keys.

Attributes

def toMap: Map[String, YamlNode]

Gets key-node map.

Gets key-node map.

Attributes

Concrete methods

def get(key: String): Option[YamlNode]

Optionally gets node.

Optionally gets node.

Value parameters

key

mapping key

Attributes

def getBigDecimal(key: String): BigDecimal

Gets node as BigDecimal.

Gets node as BigDecimal.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getBigInt(key: String): BigInt

Gets node as BigInt.

Gets node as BigInt.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getBoolean(key: String): Boolean

Gets node as Boolean.

Gets node as Boolean.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getDouble(key: String): Double

Gets node as Double.

Gets node as Double.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getFloat(key: String): Float

Gets node as Float.

Gets node as Float.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getInt(key: String): Int

Gets node as Int.

Gets node as Int.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getLong(key: String): Long

Gets node as Long.

Gets node as Long.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getMapping(key: String): YamlMapping

Gets node as YamlMapping.

Gets node as YamlMapping.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getOrElse(key: String, default: => YamlNode): YamlNode

Gets node or returns default node.

Gets node or returns default node.

Value parameters

default

default node

key

mapping key

Attributes

def getSequence(key: String): YamlSequence

Gets node as YamlSequence.

Gets node as YamlSequence.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def getString(key: String): String

Gets node as String.

Gets node as String.

Value parameters

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def isNull(key: String): Boolean

Tests for null.

Tests for null.

Value parameters

key

mapping key

Attributes

Throws
java.util.NoSuchElementException

if key does not exist

def read[T](key: String)(using constructor: YamlConstructor[T]): T

Reads constructed data.

Reads constructed data.

Value parameters

constructor

data constructor

key

mapping key

Attributes

Throws
java.lang.NullPointerException

if node is null

java.util.NoSuchElementException

if key does not exist

def readOption[T](key: String)(using constructor: YamlConstructor[T]): Option[T]

Optionally reads constructed data.

Optionally reads constructed data.

Value parameters

constructor

data constructor

key

mapping key

Attributes

Returns

Some constructed data, or None if key does not exists or its associated node is null

def readOrElse[T](key: String, default: => T)(using constructor: YamlConstructor[T]): T

Reads constructed data or returns default value.

Reads constructed data or returns default value.

Value parameters

constructor

data constructor

key

mapping key

Attributes

Returns

constructed data, or default value if key does not exist or its associated node is null

Inherited methods

def as[T](using constructor: YamlConstructor[T]): T

Constructs data.

Constructs data.

Value parameters

constructor

data constructor

Attributes

Inherited from:
YamlNode
def isEmpty: Boolean

Tests for empty.

Tests for empty.

Attributes

Inherited from:
YamlCollection
def nonEmpty: Boolean

Tests for non-empty.

Tests for non-empty.

Attributes

Inherited from:
YamlCollection
def size: Int

Gets collection size.

Gets collection size.

Attributes

Inherited from:
YamlCollection