Dotty Documentation

0.14.0-bin-SNAPSHOT

final case class FlagSet
extends AnyVal with Product with Serializable

A FlagSet represents a set of flags. Flags are encoded as follows: The first two bits indicate whether a flagset applies to terms, to types, or to both. Bits 2..63 are available for properties and can be doubly used for terms and types.

[-] Constructors

FlagSet ( bits: Long )

[-] Members

[+] val bits : Long
[+] def & ( that: FlagSet ) : FlagSet

The intersection of this flag set and the given flag set

[+] def &~ ( that: FlagSet ) : FlagSet

The intersection of this flag set with the complement of the given flag set

[+] def <= ( that: FlagSet ) : Boolean

Is this flag set a subset of that one?

[+] def ^ ( that: FlagSet ) : FlagSet
[+] def firstBit : Int

The lowest non-kind bit set in this flagset

[+] private def flagString ( idx: Int ) : List [ String ]

The list of non-empty names of flags with given index idx that are set in this FlagSet

[+] def flagStrings : Seq [ String ]

The list of non-empty names of flags that are set in this FlagSet

[+] def is ( flags: FlagSet ) : Boolean

Does this flag set have a non-empty intersection with the given flag set? This means that both the kind flags and the carrier bits have non-empty intersection.

[+] def is ( flags: FlagSet , butNot: FlagSet ) : Boolean

Does this flag set have a non-empty intersection with the given flag set, and at the same time contain none of the flags in the butNot set?

[+] def is ( flags: FlagConjunction ) : Boolean

Does this flag set have all of the flags in given flag conjunction? Pre: The intersection of the typeflags of both sets must be non-empty.

[+] def is ( flags: FlagConjunction , butNot: FlagSet ) : Boolean

Does this flag set have all of the flags in given flag conjunction? and at the same time contain none of the flags in the butNot set? Pre: The intersection of the typeflags of both sets must be non-empty.

[+] def isEmpty : Boolean
[+] def isTermFlags : Boolean

Does this flag set apply to terms?

[+] def isTypeFlags : Boolean

Does this flag set apply to terms?

[+] def numFlags : Int

The number of non-kind flags in this set

[+] def toCommonFlags : FlagSet

This flag set with all flags transposed to be common flags

[+] override def toString : String

The string representation of this flag set

[+] def toTermFlags : FlagSet

This flag set with all flags transposed to be term flags

[+] def toTypeFlags : FlagSet

This flag set with all flags transposed to be type flags

[+] def | ( that: FlagSet ) : FlagSet

The union of this flag set and the given flag set Combining two FlagSets with | will give a FlagSet that has the intersection of the applicability to terms/types of the two flag sets. It is checked that the intersection is not empty.