lima.mathematical.factorisation
Class Factor

java.lang.Object
  |
  +--lima.mathematical.factorisation.Factor
Direct Known Subclasses:
TestFactor

public class Factor
extends java.lang.Object

An object of this class represents an integer number in the form "x to the power of y", where x is the integer base, and y is the integer exponent. Objects of this class are immutable.


Constructor Summary
protected Factor()
          Construct a factor object with a base and exponent both equal to one.
protected Factor(java.math.BigInteger base)
          Construct a factor object with the specified base and the exponent equal to one.
protected Factor(java.math.BigInteger base, int exponent)
          Construct a factor object with the specified base and exponent.
 
Method Summary
 java.math.BigInteger getBase()
          Obtain the base.
 int getExponent()
          Obtain the exponent.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Generate a textual description of a factor object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Factor

protected Factor()
Construct a factor object with a base and exponent both equal to one.


Factor

protected Factor(java.math.BigInteger base)
Construct a factor object with the specified base and the exponent equal to one.

Parameters:
base - - the required base.

Factor

protected Factor(java.math.BigInteger base,
                 int exponent)
Construct a factor object with the specified base and exponent.

Parameters:
base - - the required base.
exponent - - the required exponent.
Method Detail

getBase

public java.math.BigInteger getBase()
Obtain the base.


getExponent

public int getExponent()
Obtain the exponent.


toString

public java.lang.String toString()
Generate a textual description of a factor object.

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)