YamlCollectionFacade

shampoo.yaml.YamlCollectionFacade

Assumes either YAML mapping or YAML sequence.

Attributes

See also
Note

A collection facade is created by conversion only.

Graph
Supertypes
trait YamlSequence
trait YamlMapping
trait YamlNode
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete 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 apply(index: Int): YamlNode

Gets node.

Gets node.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

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 size: Int

Gets collection size.

Gets collection size.

Attributes

def toMap: Map[String, YamlNode]

Gets key-node map.

Gets key-node map.

Attributes

def toSeq: Seq[YamlNode]

Gets node sequence.

Gets node sequence.

Attributes

Inherited methods

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

Constructs data.

Constructs data.

Value parameters

constructor

data constructor

Attributes

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

Optionally gets node.

Optionally gets node.

Value parameters

key

mapping key

Attributes

Inherited from:
YamlMapping
def getBigDecimal(index: Int): BigDecimal

Gets node as BigDecimal.

Gets node as BigDecimal.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getBigInt(index: Int): BigInt

Gets node as BigInt.

Gets node as BigInt.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getBoolean(index: Int): Boolean

Gets node as Boolean.

Gets node as Boolean.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getDouble(index: Int): Double

Gets node as Double.

Gets node as Double.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getFloat(index: Int): Float

Gets node as Float.

Gets node as Float.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getInt(index: Int): Int

Gets node as Int.

Gets node as Int.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getLong(index: Int): Long

Gets node as Long.

Gets node as Long.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getMapping(index: Int): YamlMapping

Gets node as YamlMapping.

Gets node as YamlMapping.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
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

Inherited from:
YamlMapping
def getSequence(index: Int): YamlSequence

Gets node as YamlSequence.

Gets node as YamlSequence.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def getString(index: Int): String

Gets node as String.

Gets node as String.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def isEmpty: Boolean

Tests for empty.

Tests for empty.

Attributes

Inherited from:
YamlCollection
def isNull(index: Int): Boolean

Tests for null.

Tests for null.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def nonEmpty: Boolean

Tests for non-empty.

Tests for non-empty.

Attributes

Inherited from:
YamlCollection
def read[T](index: Int)(using constructor: YamlConstructor[T]): T

Reads constructed data.

Reads constructed data.

Value parameters

index

sequence index

Attributes

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

java.lang.NullPointerException

if node is null

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def readOption[T](index: Int)(using constructor: YamlConstructor[T]): Option[T]

Optionally reads constructed data.

Optionally reads constructed data.

Value parameters

constructor

data constructor

index

sequence index

Attributes

Returns

Some constructed data, or None if node is null

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

Inherited from:
YamlSequence
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

Inherited from:
YamlMapping
def readOrElse[T](index: Int, 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

index

sequence index

Attributes

Returns

constructed data, or default value if node is null

Throws
java.lang.IndexOutOfBoundsException

if index is out of bounds

Inherited from:
YamlSequence
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 from:
YamlMapping