|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--tauzaman.calendricsystem.Granularity
The Granularity class is for granularities in calendars. A granularity is a "system of measurement" within a calendar, for example, days, months, and years are common granularities within the Gregorian calendar. A granularity is a modeled as a sequence of granules. The granules are labeled with integers. Each integer is the distance of the granule from the granularity's anchor point (the zeroth granule).
Granule,
Serialized Form| Constructor Summary | |
Granularity(java.lang.String name)
Constructs a Calendarless Granularity. |
|
Granularity(java.lang.String name,
java.net.URL calendarUrl)
Constructs a Granularity. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if this Granularity's global identity
is equal to the global identity of the given Granularity.
|
java.net.URL |
getCalendarUrl()
Returns calendar url part of this Granularity.
|
java.lang.String |
getLocalName()
Returns name of this Granularity. |
int |
hashCode()
|
void |
setCalendarUrl(java.net.URL calendarUrl)
Sets Calendar URL of this Granularity. |
java.lang.String |
toString()
Returns String representation of this Granularity.
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Granularity(java.lang.String name,
java.net.URL calendarUrl)
Granularity.
name - String name of Granularity, such as "day"calendarUrl - URL of Calendar that contains this Granularity namepublic Granularity(java.lang.String name)
Calendarless Granularity.
name - String name of Granularity, such as "day"| Method Detail |
public void setCalendarUrl(java.net.URL calendarUrl)
Calendar URL of this Granularity.
calendarUrl - URL of Calendar that contains this Granularity namepublic java.lang.String getLocalName()
Granularity.
Granularitypublic java.net.URL getCalendarUrl()
Granularity.
If this Granularity is calendar-less Granularity,
the null is returned.
Calendar of this Granularity.public boolean equals(java.lang.Object obj)
Granularity's global identity
is equal to the global identity of the given Granularity.
There are three possibilities of this equality check:
Calendar-less Granularities
is determined by checking their local names only,
Calendar-less Granularity
and Calendar Granularity always returns false,
Calendar Granularity
and Calendar Granularity is determined by checking
their parent Calendars as well as their local names.
equals in class java.lang.Objectpublic java.lang.String toString()
Granularity.
return a String representing this Granularity
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
tauZaman v0.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||