|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.terms.concrete.GYear
public class GYear
Simple implementation of the IGYear.
This class represents a year.
ATTENTION: At the moment it is
not possible to represent BC dates
$Id$
| Constructor Summary | |
|---|---|
GYear(int year)
Creates a new year. |
|
GYear(int year,
int tzHour,
int tzMinute)
Creates a new year within the given timezone. |
|
| Method Summary | |
|---|---|
int |
compareTo(ITerm o)
|
boolean |
equals(Object obj)
|
URI |
getDatatypeIRI()
Returns the fully qualified identifier for the data type corresponding to this term. |
Integer |
getValue()
Return the wrapped type. |
int |
getYear()
Returns the year (a gregorian calendar year). |
int |
hashCode()
|
boolean |
isGround()
Checks whether the term is ground (a term with no variables). |
String |
toCanonicalString()
Returns a canonical string representation of this term. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GYear(int year)
year - the year
public GYear(int year,
int tzHour,
int tzMinute)
year - the yeartzHour - the timezone hours (relative to GMT)tzMinute - the timezone minutes (relative to GMT)
IllegalArgumentException - if the tzHour and tzMinute
wheren't both positive, or negative| Method Detail |
|---|
public int compareTo(ITerm o)
compareTo in interface Comparable<ITerm>public boolean equals(Object obj)
equals in class Objectpublic int getYear()
IGYear
getYear in interface IGYearpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic boolean isGround()
ITerm
isGround in interface ITermtrue if the term is ground,
otherwise false.public Integer getValue()
IGYear
getValue in interface IGYeargetValue in interface ITermpublic URI getDatatypeIRI()
IConcreteTerm
getDatatypeIRI in interface IConcreteTermpublic String toCanonicalString()
IConcreteTerm
toCanonicalString in interface IConcreteTerm
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||