object North extends CompassDir with Product with Serializable
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 via import o1._
.
- Alphabetic
- By Inheritance
- North
- CompassDir
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def clockwise: CompassDir
Returns the next of the four compass directions, moving clockwise from this one.
Returns the next of the four compass directions, moving clockwise from this one. For instance, calling this method on
North
returnsEast
.- Definition Classes
- CompassDir
- def counterClockwise: CompassDir
Returns the next of the four compass directions, moving counterclockwise from this one.
Returns the next of the four compass directions, moving counterclockwise from this one. For instance, calling this method on
North
returnsWest
.- Definition Classes
- CompassDir
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def toString: String
Returns a textual description of this direction, which is the English name of the direction.
Returns a textual description of this direction, which is the English name of the direction.
- Definition Classes
- CompassDir → AnyRef → Any
- val xStep: Int
- Definition Classes
- CompassDir
- val yStep: Int
- Definition Classes
- CompassDir