Methods Summary |
---|
public boolean | equals(java.lang.Object o)
return o instanceof TwilightState && equals((TwilightState)o);
|
public boolean | equals(com.android.server.twilight.TwilightState other)
return other != null
&& mIsNight == other.mIsNight
&& mYesterdaySunset == other.mYesterdaySunset
&& mTodaySunrise == other.mTodaySunrise
&& mTodaySunset == other.mTodaySunset
&& mTomorrowSunrise == other.mTomorrowSunrise;
|
public long | getTodaySunrise()Returns the time of today's sunrise in the System.currentTimeMillis() timebase,
or -1 if the sun never rises.
return mTodaySunrise;
|
public long | getTodaySunset()Returns the time of today's sunset in the System.currentTimeMillis() timebase,
or -1 if the sun never sets.
return mTodaySunset;
|
public long | getTomorrowSunrise()Returns the time of tomorrow's sunrise in the System.currentTimeMillis() timebase,
or -1 if the sun never rises.
return mTomorrowSunrise;
|
public long | getYesterdaySunset()Returns the time of yesterday's sunset in the System.currentTimeMillis() timebase,
or -1 if the sun never sets.
return mYesterdaySunset;
|
public int | hashCode()
return 0; // don't care
|
public boolean | isNight()Returns true if it is currently night time.
return mIsNight;
|
public java.lang.String | toString()
DateFormat f = DateFormat.getDateTimeInstance();
return "{TwilightState: isNight=" + mIsNight
+ ", mYesterdaySunset=" + f.format(new Date(mYesterdaySunset))
+ ", mTodaySunrise=" + f.format(new Date(mTodaySunrise))
+ ", mTodaySunset=" + f.format(new Date(mTodaySunset))
+ ", mTomorrowSunrise=" + f.format(new Date(mTomorrowSunrise))
+ "}";
|