TagSet

object TagSet
Companion:
class
class Object
trait Matchable
class Any
TagSet.type

Type members

Classlikes

object Builder
Companion:
class
trait Builder

A temporary structure that accumulates key/value and creates a new TagSet instance from them. It is faster to use a Builder and add tags to it rather than creating TagSet and add each key individually. Builder instances rely on internal mutable state and are not thread safe.

A temporary structure that accumulates key/value and creates a new TagSet instance from them. It is faster to use a Builder and add tags to it rather than creating TagSet and add each key individually. Builder instances rely on internal mutable state and are not thread safe.

Companion:
object
trait Lookup[T]

Describes a strategy to lookup values from a TagSet instance. Implementations of this interface will be provided with the actual data structure containing the tags and must perform any necessary runtime type checks to ensure that the returned value is in assignable to the expected type T.

Describes a strategy to lookup values from a TagSet instance. Implementations of this interface will be provided with the actual data structure containing the tags and must perform any necessary runtime type checks to ensure that the returned value is in assignable to the expected type T.

Several implementation are provided in the Lookup companion object and it is recommended to import and use those definitions when looking up keys from a Tags instance.

trait Storage

Abstracts the actual storage used for a TagSet. This interface resembles a stripped down interface of an immutable map of String to Any, used to expose the underlying structure where tags are stored to Lookups, without leaking the actual implementation.

Abstracts the actual storage used for a TagSet. This interface resembles a stripped down interface of an immutable map of String to Any, used to expose the underlying structure where tags are stored to Lookups, without leaking the actual implementation.

Value members

Concrete methods

Creates a new Builder instance.

Creates a new Builder instance.

def from(map: Map[String, Any]): TagSet

Constructs a new TagSet instance from a Map. The returned TagSet will only contain the entries that have String, Long or Boolean values from the supplied map, any other entry in the map will be ignored.

Constructs a new TagSet instance from a Map. The returned TagSet will only contain the entries that have String, Long or Boolean values from the supplied map, any other entry in the map will be ignored.

def from(map: Map[String, Any]): TagSet

Constructs a new TagSet instance from a Map. The returned TagSet will only contain the entries that have String, Long or Boolean values from the supplied map, any other entry in the map will be ignored.

Constructs a new TagSet instance from a Map. The returned TagSet will only contain the entries that have String, Long or Boolean values from the supplied map, any other entry in the map will be ignored.

def of(key: String, value: String): TagSet

Construct a new TagSet instance with a single key/value pair.

Construct a new TagSet instance with a single key/value pair.

def of(key: String, value: Boolean): TagSet

Construct a new TagSet instance with a single key/value pair.

Construct a new TagSet instance with a single key/value pair.

def of(key: String, value: Long): TagSet

Construct a new TagSet instance with a single key/value pair.

Construct a new TagSet instance with a single key/value pair.

Concrete fields

A valid instance of tags that doesn't contain any pairs.

A valid instance of tags that doesn't contain any pairs.