class Star extends AnyRef
Each Star
object represents a star on a star map. It records some basic information
(an identifier, a location, and a magnitude); in addition, some but not all stars have
been assigned a name. (In reality, many stars have multiple alternative names, but this
class does not capture that fact.)
- Alphabetic
- By Inheritance
- Star
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Star(id: Int, coords: StarCoords, magnitude: Double, name: Option[String])
- id
a number that uniquely identifies the star from the other visible stars (a so-called Henry Draper number)
- coords
the location of the star on a two-dimensional star map
- magnitude
the apparent magnitude (brightness) of the star: smaller means brighter!
- name
the star's name (wrapped in
Some
), orNone
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
- 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()
- val coords: StarCoords
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val id: Int
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val magnitude: Double
- val name: Option[String]
- 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()
- def posIn(skyPic: o1.Pic): world.Pos
Determines the location of this star within a given image of a star map.
Determines the location of this star within a given image of a star map. This method effectively converts the
coords
of this star (aStarCoords
) into aPos
within the given image. For instance, if this star hascoords
of (0,0), and a 400-by-400 pixel image is given, this method returns aPos
of (200,200).- See also
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
Returns a string description of the star.
Returns a string description of the star. The format of the string varies slightly depending on whether the star has a name or not. For a named star, the description has the form "#ID NAME (COORDS)"; e.g., "#39801 Betelgeuse (x=0.02, y=0.99)". In case of an unnamed star, the name and one of the spaces are omitted; e.g.,"#39810 (x=0.016, y=0.30)".
- Definition Classes
- Star → 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])
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.