Skip to content

@FlagSet[F]

A set of flags, each named by a symbol in F, such as fs.unix.Mode.

Iterating a flag set yields symbols naming the flags it has set. Flag sets of the same type are equal when the same flags are set, and combine with |, &, ^, and ~.

Inherits from: Iterable[F]

Constructor

FlagSet ...flags -> S

Constructs a flag set from symbols.

Parameters

NameTypeDescription
self Type[S] Receiver.
...flags F

FlagSet flags -> S

Constructs a flag set from one iterable of symbols.

Parameters

NameTypeDescription
self Type[S] Receiver.
flags Iterable[F]

Methods

(band)[S] other -> S

Returns the flags set in both.

Parameters

NameTypeDescription
self S Receiver.
other S

(bnot)[S]() -> S

Returns the flags of the type that are not set.

Parameters

NameTypeDescription
self S Receiver.

(bor)[S] other -> S

Returns the flags set in either.

Parameters

NameTypeDescription
self S Receiver.
other S

(bxor)[S] other -> S

Returns the flags set in exactly one.

Parameters

NameTypeDescription
self S Receiver.
other S

contains flag -> Bool

Tests whether all flags named by flag are set.

Parameters

NameTypeDescription
flag F