|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.codecs.tiff.TIFFRational
Data class to store a TIFF rational number.
A TIFF rational number is a fraction given by 32 bit integer numerator and denominator values.
It is one of the data types used in TIFF tags (TIFFTag
).
For more information on TIFF's internals, see TIFFCodec
, which lists a few links
to TIFF specification documents.
Constructor Summary | |
TIFFRational(int numerator,
int denominator)
Creates a TiffRational object from the arguments. |
Method Summary | |
double |
getAsDouble()
Returns the fraction as a double value. |
float |
getAsFloat()
Returns the fraction as a float value. |
int |
getDenominator()
Returns the denominator value that was given to the constructor. |
int |
getNumerator()
Returns the numerator value that was given to the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TIFFRational(int numerator, int denominator)
numerator
- the numerator of the fraction stored in this objectdenominator
- the denominator of the fraction stored in this object
IllegalArgumentException
- if denominator is 0
(division by zero is not allowed)Method Detail |
public int getDenominator()
public double getAsDouble()
double
value.
getAsFloat()
public float getAsFloat()
float
value.
getAsDouble()
public int getNumerator()
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |