barsuift.simLife.environment
Class BasicSun
java.lang.Object
java.util.Observable
barsuift.simLife.environment.BasicSun
- All Implemented Interfaces:
- Sun, IObservable
public class BasicSun
- extends java.util.Observable
- implements Sun
Class representing the sun.
Its only property is its luminosity, as a Percent instance.
|
Constructor Summary |
BasicSun(SunState state)
Creates a Sun instance with given state |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BasicSun
public BasicSun(SunState state)
throws java.lang.IllegalArgumentException
- Creates a Sun instance with given state
- Throws:
java.lang.IllegalArgumentException - if the given sun state is null
getLuminosity
public Percent getLuminosity()
- Specified by:
getLuminosity in interface Sun
setLuminosity
public void setLuminosity(Percent luminosity)
throws java.lang.IllegalArgumentException
- Specified by:
setLuminosity in interface Sun
- Throws:
java.lang.IllegalArgumentException
getRiseAngle
public Percent getRiseAngle()
- Specified by:
getRiseAngle in interface Sun
setRiseAngle
public void setRiseAngle(Percent riseAngle)
- Specified by:
setRiseAngle in interface Sun
getZenithAngle
public Percent getZenithAngle()
- Specified by:
getZenithAngle in interface Sun
setZenithAngle
public void setZenithAngle(Percent zenithAngle)
- Specified by:
setZenithAngle in interface Sun
getState
public SunState getState()
- Specified by:
getState in interface Sun
getSun3D
public Sun3D getSun3D()
- Specified by:
getSun3D in interface Sun
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
Copyright © 2010. All Rights Reserved.