object CompassDir extends Serializable
This companion object of class CompassDir
provides a selection of related
constants and utility methods.
This object has an alias in the top-level package o1, so it’s accessible to students
simply via import o1._
.
- Alphabetic
- By Inheritance
- CompassDir
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val Clockwise: Vector[CompassDir]
a collection of all the four directions, in clockwise order starting with
North
- val Count: Int
The number of the compass directions represented by class
CompassDir
.The number of the compass directions represented by class
CompassDir
. Four, that is. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromArrowKey(key: Key): Option[CompassDir]
Returns the CompassDir that corresponds to the given arrow key.
Returns the CompassDir that corresponds to the given arrow key. For example, the right arrow corresponds to
East
.- key
any key on the keyboard
- returns
one of the four
CompassDir
s;None
if the given key was not one of the four arrow keys
- def fromKey(key: Key): Option[CompassDir]
Returns the CompassDir that corresponds to the given arrow key.
Returns the CompassDir that corresponds to the given arrow key. For example, the right arrow or the D key corresponds to
East
.- key
any key on the keyboard
- returns
one of the four
CompassDir
s;None
if the given key was not one of the four arrow keys or one of the four WASD keys
- See also
- def fromWASD(key: Key): Option[CompassDir]
Returns the CompassDir that corresponds to the given WASD key.
Returns the CompassDir that corresponds to the given WASD key. For example, the D key corresponds to
East
.- key
any key on the keyboard
- returns
one of the four
CompassDir
s;None
if the given key was not one of the four WASD keys
- See also
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object East extends CompassDir with Product with Serializable
This immutable singleton object represents the eastwardly compass direction.
This immutable singleton object represents the eastwardly compass direction. It’s one of the four predefined instances of class
CompassDir
. It has an alias in the top-level package o1, so it’s accessible to students simply viaimport o1._
. - object North extends CompassDir with Product with Serializable
This immutable singleton object represents the northwardly compass direction.
This immutable singleton object represents the northwardly compass direction. It’s one of the four predefined instances of class
CompassDir
. It has an alias in the top-level package o1, so it’s accessible to students simply viaimport o1._
. - object South extends CompassDir with Product with Serializable
This immutable singleton object represents the southwardly compass direction.
This immutable singleton object represents the southwardly compass direction. It’s one of the four predefined instances of class
CompassDir
. It has an alias in the top-level package o1, so it’s accessible to students simply viaimport o1._
. - object West extends CompassDir with Product with Serializable
This immutable singleton object represents the westwardly compass direction.
This immutable singleton object represents the westwardly compass direction. It’s one of the four predefined instances of class
CompassDir
. It has an alias in the top-level package o1, so it’s accessible to students simply viaimport o1._
.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.