|
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 FormField Summary | |
private java.net.URL |
calendarUrl
URL of Calendar of which this Granularity is created |
private java.lang.String |
name
local name of this Granularity |
Constructor Summary | |
Granularity(java.lang.String name)
Constructs a Calendar less 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 |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String name
Granularity
private java.net.URL calendarUrl
Calendar
of which this Granularity
is created
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)
Calendar
less 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
.
Granularity
public 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 Calendar
s as well as their local names.
equals
in class java.lang.Object
public java.lang.String toString()
Granularity
.
return a String representing this Granularity
toString
in class java.lang.Object
public 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 |