trait BooleanProp extends Prop[Boolean]
- Alphabetic
- By Inheritance
- BooleanProp
- Prop
- AnyRef
- Any
- by booleanPropAsBoolean
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
clear(): Unit
Removes the property from the underlying map.
Removes the property from the underlying map.
- Definition Classes
- Prop
-
abstract
def
disable(): Unit
Alter this property so that
value
will be false. -
abstract
def
enable(): Unit
Alter this property so that
value
will be true. -
abstract
def
get: String
Gets the current string value if any.
Gets the current string value if any. Will not return null: use
isSet
to test for existence.- returns
the current string value if any, else the empty string
- Definition Classes
- Prop
-
abstract
def
isSet: Boolean
True if the key exists in the properties map.
True if the key exists in the properties map. Note that this is not sufficient for a Boolean property to be considered true.
- returns
whether the map contains the key
- Definition Classes
- Prop
-
abstract
def
key: String
The full name of the property, e.g., "java.awt.headless".
The full name of the property, e.g., "java.awt.headless".
- Definition Classes
- Prop
-
abstract
def
option: Option[Boolean]
Some(value) if the property is set, None otherwise.
Some(value) if the property is set, None otherwise.
- Definition Classes
- Prop
-
abstract
def
set(newValue: String): String
Sets the property.
Sets the property.
- newValue
the new string value
- returns
the old value, or null if it was unset.
- Definition Classes
- Prop
-
abstract
def
setValue[T1 >: Boolean](value: T1): Boolean
Sets the property with a value of the represented type.
Sets the property with a value of the represented type.
- Definition Classes
- Prop
-
abstract
def
toggle(): Unit
Toggle the property between enabled and disabled states.
-
abstract
def
value: Boolean
The semantics of value are determined at Prop creation.
The semantics of value are determined at Prop creation. See methods
valueIsTrue
andkeyExists
in object BooleanProp for examples.- returns
true if the current String is considered true, false otherwise
- Definition Classes
- BooleanProp → Prop
Concrete Value Members
-
def
&(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if both of them evaluate to true.Compares two Boolean expressions and returns
true
if both of them evaluate to true.a & b
returnstrue
if and only ifa
andb
aretrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
- Note
This method evaluates both
a
andb
, even if the result is already determined after evaluatinga
.
-
def
&&(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if both of them evaluate to true.Compares two Boolean expressions and returns
true
if both of them evaluate to true.a && b
returnstrue
if and only ifa
andb
aretrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
- Note
This method uses 'short-circuit' evaluation and behaves as if it was declared as
def &&(x: => Boolean): Boolean
. Ifa
evaluates tofalse
,false
is returned without evaluatingb
.
-
def
^(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if they evaluate to a different value.Compares two Boolean expressions and returns
true
if they evaluate to a different value.a ^ b
returns
trueif and only if
a
istrue
andb
isfalse
ora
isfalse
andb
istrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
-
def
unary_!: Boolean
Negates a Boolean expression.
Negates a Boolean expression.
-
!a
results infalse
if and only ifa
evaluates totrue
and -!a
results intrue
if and only ifa
evaluates tofalse
.- returns
the negated expression
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
-
def
|(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if one or both of them evaluate to true.Compares two Boolean expressions and returns
true
if one or both of them evaluate to true.a | b
returnstrue
if and only ifa
istrue
orb
istrue
ora
andb
aretrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
- Note
This method evaluates both
a
andb
, even if the result is already determined after evaluatinga
.
-
def
||(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if one or both of them evaluate to true.Compares two Boolean expressions and returns
true
if one or both of them evaluate to true.a || b
returnstrue
if and only ifa
istrue
orb
istrue
ora
andb
aretrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Definition Classes
- Boolean
- Note
This method uses 'short-circuit' evaluation and behaves as if it was declared as
def ||(x: => Boolean): Boolean
. Ifa
evaluates totrue
,true
is returned without evaluatingb
.
Shadowed Implicit Value Members
-
def
!=(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if they evaluate to a different value.Compares two Boolean expressions and returns
true
if they evaluate to a different value.a != b
returnstrue
if and only ifa
istrue
andb
isfalse
ora
isfalse
andb
istrue
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(booleanProp: Boolean).!=(x)
- Definition Classes
- Boolean
-
def
==(x: Boolean): Boolean
Compares two Boolean expressions and returns
true
if they evaluate to the same value.Compares two Boolean expressions and returns
true
if they evaluate to the same value.a == b
returnstrue
if and only ifa
andb
aretrue
ora
andb
arefalse
.
- Implicit
- This member is added by an implicit conversion from BooleanProp to Boolean performed by method booleanPropAsBoolean in scala.sys.BooleanProp.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(booleanProp: Boolean).==(x)
- Definition Classes
- Boolean
This is the documentation for the Scala standard library.
Package structure
The scala package contains core types like
Int
,Float
,Array
orOption
which are accessible in all Scala compilation units without explicit qualification or imports.Notable packages include:
scala.collection
and its sub-packages contain Scala's collections frameworkscala.collection.immutable
- Immutable, sequential data-structures such asVector
,List
,Range
,HashMap
orHashSet
scala.collection.mutable
- Mutable, sequential data-structures such asArrayBuffer
,StringBuilder
,HashMap
orHashSet
scala.collection.concurrent
- Mutable, concurrent data-structures such asTrieMap
scala.collection.parallel.immutable
- Immutable, parallel data-structures such asParVector
,ParRange
,ParHashMap
orParHashSet
scala.collection.parallel.mutable
- Mutable, parallel data-structures such asParArray
,ParHashMap
,ParTrieMap
orParHashSet
scala.concurrent
- Primitives for concurrent programming such asFutures
andPromises
scala.io
- Input and output operationsscala.math
- Basic math functions and additional numeric types likeBigInt
andBigDecimal
scala.sys
- Interaction with other processes and the operating systemscala.util.matching
- Regular expressionsOther packages exist. See the complete list on the right.
Additional parts of the standard library are shipped as separate libraries. These include:
scala.reflect
- Scala's reflection API (scala-reflect.jar)scala.xml
- XML parsing, manipulation, and serialization (scala-xml.jar)scala.swing
- A convenient wrapper around Java's GUI framework called Swing (scala-swing.jar)scala.util.parsing
- Parser combinators (scala-parser-combinators.jar)Automatic imports
Identifiers in the scala package and the
scala.Predef
object are always in scope by default.Some of these identifiers are type aliases provided as shortcuts to commonly used classes. For example,
List
is an alias forscala.collection.immutable.List
.Other aliases refer to classes provided by the underlying platform. For example, on the JVM,
String
is an alias forjava.lang.String
.