Hello Lubona and welcome to bytes.com!
I'm not quite sure what you want your class to do; how would you want to use it?
Generally speaking, there are several types of numbers used in Java. Thanks to
Autoboxing and Unboxing you should be fine just using the superclass
Number for abstracting any kind of number type.
However the comparing part is a bit more difficult in that case; to compare two objects with the built in functions you need them to implement the
Comparable interface. All numbers do this except for
AtomicInteger and
AtomicLong. If the main concern is comparing numbers, maybe the constructor should take Comparables instead of Numbers. Or of course you create several constructors, one for each number type you want to be able to compare.