Package net.simplace.core.ui.jfreechart
Klasse TimePeriod
java.lang.Object
org.jfree.data.time.RegularTimePeriod
net.simplace.core.ui.jfreechart.TimePeriod
- Alle implementierten Schnittstellen:
Serializable,Comparable,org.jfree.chart.date.MonthConstants,org.jfree.data.time.TimePeriod
- Autor:
- Andreas Enders
Represents a year in the range -9999 to 9999. This class is immutable,
which is a requirement for all
RegularTimePeriodsubclasses. - Siehe auch:
-
Feldübersicht
Von Schnittstelle geerbte Felder org.jfree.chart.date.MonthConstants
APRIL, AUGUST, DECEMBER, FEBRUARY, JANUARY, JULY, JUNE, MARCH, MAY, NOVEMBER, OCTOBER, SEPTEMBER -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a newYear, based on the current system date/time.TimePeriod(Date start, Date end) Creates a time period representing a single year. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintReturns an integer indicating the order of thisYearobject relative to the specified object: negative == before, zero == same, positive == after.booleanTests the equality of thisYearobject to an arbitrary object.longReturns the first millisecond of the year.longgetFirstMillisecond(Calendar calendar) Returns the first millisecond of the year, evaluated using the supplied calendar (which determines the time zone).longReturns the last millisecond of the year.longgetLastMillisecond(Calendar calendar) Returns the last millisecond of the year, evaluated using the supplied calendar (which determines the time zone).longReturns a serial index number for the year.inthashCode()Returns a hash code for this object instance.org.jfree.data.time.RegularTimePeriodnext()voidRecalculates the start date/time and end date/time for this time period relative to the supplied calendar (which incorporates a time zone).org.jfree.data.time.RegularTimePeriodprevious()toString()Returns a string representing the year..Von Klasse geerbte Methoden org.jfree.data.time.RegularTimePeriod
createInstance, downsize, getCalendarInstance, getEnd, getMiddleMillisecond, getMiddleMillisecond, getMillisecond, getStart, setCalendarInstancePrototype, setThreadLocalCalendarInstance
-
Konstruktordetails
-
TimePeriod
public TimePeriod()Creates a newYear, based on the current system date/time. -
TimePeriod
Creates a time period representing a single year.- Parameter:
start-end-year- the year.
-
-
Methodendetails
-
getFirstMillisecond
public long getFirstMillisecond()Returns the first millisecond of the year. This will be determined relative to the time zone specified in the constructor, or in the calendar instance passed in the most recent call to thepeg(Calendar)method.- Angegeben von:
getFirstMillisecondin Klasseorg.jfree.data.time.RegularTimePeriod- Gibt zurück:
- The first millisecond of the year.
- Siehe auch:
-
getLastMillisecond
public long getLastMillisecond()Returns the last millisecond of the year. This will be determined relative to the time zone specified in the constructor, or in the calendar instance passed in the most recent call to thepeg(Calendar)method.- Angegeben von:
getLastMillisecondin Klasseorg.jfree.data.time.RegularTimePeriod- Gibt zurück:
- The last millisecond of the year.
- Siehe auch:
-
peg
Recalculates the start date/time and end date/time for this time period relative to the supplied calendar (which incorporates a time zone).- Angegeben von:
pegin Klasseorg.jfree.data.time.RegularTimePeriod- Parameter:
calendar- the calendar (nullnot permitted).- Seit:
- 1.0.3
-
getSerialIndex
public long getSerialIndex()Returns a serial index number for the year.The implementation simply returns the second of the start time number (e.g. 2002).
- Angegeben von:
getSerialIndexin Klasseorg.jfree.data.time.RegularTimePeriod- Gibt zurück:
- The serial index number.
-
getFirstMillisecond
Returns the first millisecond of the year, evaluated using the supplied calendar (which determines the time zone).- Angegeben von:
getFirstMillisecondin Klasseorg.jfree.data.time.RegularTimePeriod- Parameter:
calendar- the calendar (nullnot permitted).- Gibt zurück:
- The first millisecond of the year.
- Löst aus:
NullPointerException- ifcalendarisnull.
-
getLastMillisecond
Returns the last millisecond of the year, evaluated using the supplied calendar (which determines the time zone).- Angegeben von:
getLastMillisecondin Klasseorg.jfree.data.time.RegularTimePeriod- Parameter:
calendar- the calendar (nullnot permitted).- Gibt zurück:
- The last millisecond of the year.
- Löst aus:
NullPointerException- ifcalendarisnull.
-
equals
Tests the equality of thisYearobject to an arbitrary object. Returnstrueif the target is aYearinstance representing the same year as this object. In all other cases, returnsfalse. -
hashCode
public int hashCode()Returns a hash code for this object instance. The approach described by Joshua Bloch in "Effective Java" has been used here:http://developer.java.sun.com/developer/Books/effectivejava /Chapter3.pdf -
compareTo
Returns an integer indicating the order of thisYearobject relative to the specified object: negative == before, zero == same, positive == after.- Angegeben von:
compareToin SchnittstelleComparable- Parameter:
o1- the object to compare.- Gibt zurück:
- negative == before, zero == same, positive == after.
-
toString
Returns a string representing the year..- Setzt außer Kraft:
toStringin Klasseorg.jfree.data.time.RegularTimePeriod- Gibt zurück:
- A string representing the year.
-
previous
public org.jfree.data.time.RegularTimePeriod previous()- Angegeben von:
previousin Klasseorg.jfree.data.time.RegularTimePeriod
-
next
public org.jfree.data.time.RegularTimePeriod next()- Angegeben von:
nextin Klasseorg.jfree.data.time.RegularTimePeriod
-