BooleanFormatter

info.fingo.spata.text.BooleanFormatter
See theBooleanFormatter companion object
final class BooleanFormatter(tt: String, ft: String, locale: Locale)

Formatter used to format and parse string representation of boolean values.

Value parameters

ft

the term representing false, case insensitive

locale

the locale used to handle case conversion

tt

the term representing true, case insensitive

Attributes

Constructor

Creates formatter.

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(tt: String, ft: String)

Creates formatter with default locale.

Creates formatter with default locale.

Value parameters

ft

the term representing false, case insensitive

tt

the term representing true, case insensitive

Attributes

Concrete methods

def format(value: Boolean): String

Returns string representation of boolean value.

Returns string representation of boolean value.

Value parameters

value

the value to be converted to string

Attributes

Returns

textual representation of value

def parse(string: String): Boolean

Obtains boolean value from text.

Obtains boolean value from text.

Value parameters

string

the text to parse

Attributes

Returns

true or false

Throws
ParseError

if text cannot be parsed to boolean