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

public class TimePeriod extends org.jfree.data.time.RegularTimePeriod implements Serializable
Autor:
Andreas Enders Represents a year in the range -9999 to 9999. This class is immutable, which is a requirement for all RegularTimePeriod subclasses.
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

    Konstruktoren
    Konstruktor
    Beschreibung
    Creates a new Year, based on the current system date/time.
    TimePeriod(Date start, Date end)
    Creates a time period representing a single year.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    int
    Returns an integer indicating the order of this Year object relative to the specified object: negative == before, zero == same, positive == after.
    boolean
    Tests the equality of this Year object to an arbitrary object.
    long
    Returns the first millisecond of the year.
    long
    Returns the first millisecond of the year, evaluated using the supplied calendar (which determines the time zone).
    long
    Returns the last millisecond of the year.
    long
    Returns the last millisecond of the year, evaluated using the supplied calendar (which determines the time zone).
    long
    Returns a serial index number for the year.
    int
    Returns a hash code for this object instance.
    org.jfree.data.time.RegularTimePeriod
     
    void
    peg(Calendar calendar)
    Recalculates 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.RegularTimePeriod
     
    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

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • TimePeriod

      public TimePeriod()
      Creates a new Year, based on the current system date/time.
    • TimePeriod

      public TimePeriod(Date start, Date end)
      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 the peg(Calendar) method.
      Angegeben von:
      getFirstMillisecond in Klasse org.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 the peg(Calendar) method.
      Angegeben von:
      getLastMillisecond in Klasse org.jfree.data.time.RegularTimePeriod
      Gibt zurück:
      The last millisecond of the year.
      Siehe auch:
    • peg

      public void peg(Calendar calendar)
      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:
      peg in Klasse org.jfree.data.time.RegularTimePeriod
      Parameter:
      calendar - the calendar (null not 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:
      getSerialIndex in Klasse org.jfree.data.time.RegularTimePeriod
      Gibt zurück:
      The serial index number.
    • getFirstMillisecond

      public long getFirstMillisecond(Calendar calendar)
      Returns the first millisecond of the year, evaluated using the supplied calendar (which determines the time zone).
      Angegeben von:
      getFirstMillisecond in Klasse org.jfree.data.time.RegularTimePeriod
      Parameter:
      calendar - the calendar (null not permitted).
      Gibt zurück:
      The first millisecond of the year.
      Löst aus:
      NullPointerException - if calendar is null.
    • getLastMillisecond

      public long getLastMillisecond(Calendar calendar)
      Returns the last millisecond of the year, evaluated using the supplied calendar (which determines the time zone).
      Angegeben von:
      getLastMillisecond in Klasse org.jfree.data.time.RegularTimePeriod
      Parameter:
      calendar - the calendar (null not permitted).
      Gibt zurück:
      The last millisecond of the year.
      Löst aus:
      NullPointerException - if calendar is null.
    • equals

      public boolean equals(Object obj)
      Tests the equality of this Year object to an arbitrary object. Returns true if the target is a Year instance representing the same year as this object. In all other cases, returns false.
      Setzt außer Kraft:
      equals in Klasse Object
      Parameter:
      obj - the object (null permitted).
      Gibt zurück:
      true if the year of this and the object are the same.
    • 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

      Setzt außer Kraft:
      hashCode in Klasse Object
      Gibt zurück:
      A hash code.
    • compareTo

      public int compareTo(Object o1)
      Returns an integer indicating the order of this Year object relative to the specified object: negative == before, zero == same, positive == after.
      Angegeben von:
      compareTo in Schnittstelle Comparable
      Parameter:
      o1 - the object to compare.
      Gibt zurück:
      negative == before, zero == same, positive == after.
    • toString

      public String toString()
      Returns a string representing the year..
      Setzt außer Kraft:
      toString in Klasse org.jfree.data.time.RegularTimePeriod
      Gibt zurück:
      A string representing the year.
    • previous

      public org.jfree.data.time.RegularTimePeriod previous()
      Angegeben von:
      previous in Klasse org.jfree.data.time.RegularTimePeriod
    • next

      public org.jfree.data.time.RegularTimePeriod next()
      Angegeben von:
      next in Klasse org.jfree.data.time.RegularTimePeriod