com.antelmann.math
Class RomanNumber
java.lang.Object
java.lang.Number
com.antelmann.math.RomanNumber
- All Implemented Interfaces:
- Addable<RomanNumber>, Serializable, Comparable<Number>
public class RomanNumber
- extends Number
- implements Addable<RomanNumber>, Comparable<Number>
a representation for a roman number (internally based on an integer)
- Since:
- 06.01.2011, 06:14:00
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
CONVERTER
public static final Converter<Integer,String> CONVERTER
FORMAT
public static final NumberFormat FORMAT
RomanNumber
public RomanNumber()
RomanNumber
public RomanNumber(int n)
RomanNumber
public RomanNumber(Number n)
RomanNumber
public RomanNumber(String n)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
add
public final RomanNumber add(RomanNumber other)
- Description copied from interface:
Addable
- adds this instance to the other given one and returns the result;
this entry itself remains untouched
- Specified by:
add in interface Addable<RomanNumber>
compareTo
public final int compareTo(Number o)
- Specified by:
compareTo in interface Comparable<Number>
toString
public String toString()
- Overrides:
toString in class Object
intValue
public final int intValue()
- Specified by:
intValue in class Number
longValue
public final long longValue()
- Specified by:
longValue in class Number
floatValue
public final float floatValue()
- Specified by:
floatValue in class Number
doubleValue
public final double doubleValue()
- Specified by:
doubleValue in class Number
hashCode
public final int hashCode()
- Overrides:
hashCode in class Object
equals
public final boolean equals(Object obj)
- Overrides:
equals in class Object
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads