org.ojalgo.type
Enum CalendarDateUnit

java.lang.Object
  extended by java.lang.Enum<CalendarDateUnit>
      extended by org.ojalgo.type.CalendarDateUnit
All Implemented Interfaces:
Serializable, Comparable<CalendarDateUnit>

public enum CalendarDateUnit
extends Enum<CalendarDateUnit>


Enum Constant Summary
CENTURY
           
DAY
           
DECADE
           
HOUR
           
MILLENIUM
           
MILLIS
           
MINUTE
           
MONTH
           
QUARTER
           
SECOND
           
WEEK
           
YEAR
           
 
Method Summary
 CalendarDateDuration convert(CalendarDateDuration aSourceDuration)
           
 double convert(CalendarDateUnit aSourceDurationUnit)
           
 double convert(double aSourceDurationMeasure, CalendarDateUnit aSourceDurationUnit)
           
 long convert(long aSourceDuration, CalendarDateUnit aSourceUnit)
           
 long count(Calendar aFromValue, Calendar aToValue)
           
 long count(Date aFromValue, Date aToValue)
           
 long count(long aFromValue, long aToValue)
           
 TimeUnit getTimeUnit()
          Note that this method may, and actually does, return null in many cases.
 boolean isCalendarUnit()
           
 void round(Calendar aCalendar)
           
 void round(Date aDate)
           
 long size()
           
 Calendar step(Calendar aCalendar)
           
 Calendar step(Calendar aCalendar, int aStepCount)
           
 Date step(Date aDate)
           
 Date step(Date aDate, int aStepCount)
           
 long step(long aTimeInMillis)
           
 long step(long aTimeInMillis, int aStepCount)
           
 long toTimeInMillis(Calendar aCalendar)
           
 long toTimeInMillis(Date aDate)
           
 long toTimeInMillis(long aTimeInMillis)
           
static CalendarDateUnit valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CalendarDateUnit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MILLIS

public static final CalendarDateUnit MILLIS

SECOND

public static final CalendarDateUnit SECOND

MINUTE

public static final CalendarDateUnit MINUTE

HOUR

public static final CalendarDateUnit HOUR

DAY

public static final CalendarDateUnit DAY

WEEK

public static final CalendarDateUnit WEEK

MONTH

public static final CalendarDateUnit MONTH

QUARTER

public static final CalendarDateUnit QUARTER

YEAR

public static final CalendarDateUnit YEAR

DECADE

public static final CalendarDateUnit DECADE

CENTURY

public static final CalendarDateUnit CENTURY

MILLENIUM

public static final CalendarDateUnit MILLENIUM
Method Detail

values

public static CalendarDateUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CalendarDateUnit c : CalendarDateUnit.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CalendarDateUnit valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

convert

public CalendarDateDuration convert(CalendarDateDuration aSourceDuration)

convert

public double convert(CalendarDateUnit aSourceDurationUnit)

convert

public double convert(double aSourceDurationMeasure,
                      CalendarDateUnit aSourceDurationUnit)

convert

public long convert(long aSourceDuration,
                    CalendarDateUnit aSourceUnit)

count

public long count(Calendar aFromValue,
                  Calendar aToValue)

count

public long count(Date aFromValue,
                  Date aToValue)

count

public long count(long aFromValue,
                  long aToValue)

getTimeUnit

public TimeUnit getTimeUnit()
Note that this method may, and actually does, return null in many cases.


isCalendarUnit

public boolean isCalendarUnit()

round

public void round(Calendar aCalendar)

round

public void round(Date aDate)

size

public long size()

step

public Calendar step(Calendar aCalendar)

step

public Calendar step(Calendar aCalendar,
                     int aStepCount)

step

public Date step(Date aDate)

step

public Date step(Date aDate,
                 int aStepCount)

step

public long step(long aTimeInMillis)

step

public long step(long aTimeInMillis,
                 int aStepCount)

toTimeInMillis

public long toTimeInMillis(Calendar aCalendar)

toTimeInMillis

public long toTimeInMillis(Date aDate)

toTimeInMillis

public long toTimeInMillis(long aTimeInMillis)