NonEmptyString

izumi.fundamentals.collections.nonempty.NonEmptyString$
See theNonEmptyString companion class

Companion object for class NonEmptyString.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def apply(firstChar: Char, otherChars: Char*): NonEmptyString

Constructs a new NonEmptyString given at least one character.

Constructs a new NonEmptyString given at least one character.

Attributes

firstChar

the first character (with index 0) contained in this NonEmptyString

otherChars

a varargs of zero or more other characters (with index 1, 2, 3, ...) contained in this NonEmptyString

def from[T](seq: Seq[Char]): Option[NonEmptyString]

Optionally construct a NonEmptyString containing the characters, if any, of a given Seq.

Optionally construct a NonEmptyString containing the characters, if any, of a given Seq.

Attributes

seq

the Seq of Char with which to construct a NonEmptyString

Returns:

a NonEmptyString containing the elements of the given Seq, if non-empty, wrapped in a Some; else None if the Seq is empty

def from[T](str: String): Option[NonEmptyString]
def unapplySeq(nonEmptyString: NonEmptyString): Some[Seq[String]]

Variable argument extractor for NonEmptyStrings.

Variable argument extractor for NonEmptyStrings.

Attributes

nonEmptyString:

the NonEmptyString containing the elements to extract

Returns:

an Seq containing this NonEmptyStrings elements, wrapped in a Some

def unsafeFrom(str: String): NonEmptyString