EDU.ksu.cis.calculator
Class ConvertBase

java.lang.Object
  |
  +--EDU.ksu.cis.calculator.ConvertBase
All Implemented Interfaces:
Operation

public class ConvertBase
extends Object
implements Operation

The convert base operation. Objects of this class are used to encapsulate a base change request.

Author:
Rod Howell (howell@cis.ksu.edu)

Constructor Summary
ConvertBase(int b)
          Constructs a new ConvertBase.
 
Method Summary
 int getBase()
          Returns the new base.
 int numOperands()
          Returns 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertBase

public ConvertBase(int b)
Constructs a new ConvertBase.

Parameters:
b - The new base.
Throws:
IllegalArgumentException - If b < 2 or b > 36.
Method Detail

numOperands

public int numOperands()
Returns 0.

Specified by:
numOperands in interface Operation

getBase

public int getBase()
Returns the new base.