|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.TextComponent
|
+--java.awt.TextField
|
+--uk.co.prosperosoftware.pspnum.PSPNum
The PSPNum class supports regular decimal numbers which may be viewed/revised in an edit box. You can set a mask for each PSPNum to control how numeric values are displayed and which keystrokes are recognised.
Each PSPNum has an exact decimal size i.e. you set the number of digits you want either side of the decimal place. The internal numeric value is exact (no degrees of precision) within these limits. You access the numeric value as an unformatted string (the Value property) or as a formatted Text property. PSPNum supports a number of common arithmetic and logical operations for which you can specify both overflow and rounding behaviour. PSPNum also triggers events which your applet/application can listen for.
Apart from operations it provides directly, PSPNum also provides operations indirectly through inheritance. You will probably find the following inherited operations most useful: From TextComponent: select() and other operations dealing with a range of selected Text, also setEditable(..) and isEditable(). From Component: Appearance operations such as those for Font, Background/Foreground color and size.
Click here for index to more PSPNum online documentation.
| Field Summary | |
static int |
CARET_POSITION_DECIMAL
The caret is positioned to the digit nearest the decimal place. |
static int |
CARET_POSITION_DEFAULT
The caret is positioned by default (per the parent TextField object which PSPNum extends). |
static int |
CARET_POSITION_FIRSTDIGIT
The caret is positioned to the first digit in the displayed Text. |
static int |
MAX_DIGITS_AFTER
Maximum number (50) of digits after decimal place for PSPNum. |
static int |
MAX_DIGITS_BEFORE
Maximum number (50) of digits before decimal place for PSPNum. |
static int |
OVERFLOW_BUMP_BEFOREDP
When overflow occurs, PSPNum automatically increments DigitsBeforeDP to accommodate the new value. |
static int |
OVERFLOW_EXCEPTION
When overflow occurs, PSPNum throws an PSPException error for which the getErrNum() function returns PSPException.NumOverflow. |
static int |
OVERFLOW_IGNORE
When overflow occurs, PSPNum silently ignores the new value. |
static int |
OVERFLOW_IGNORE_BEEP
When overflow occurs, PSPNum ignores the new value and beeps. |
static int |
OVERFLOW_TRUNCATE
When overflow occurs, PSPNum silently truncates excess high-order digits. |
static int |
OVERFLOW_TRUNCATE_BEEP
When overflow occurs, PSPNum truncates excess high-order digits and beeps. |
static int |
TEXT_ALIGN_CENTER
Text displayed in Text box is centrally aligned (positioned in middle of Text box). |
static int |
TEXT_ALIGN_LEFT
Text displayed in Text box is left aligned (this is the default for each new PSPNum). |
static int |
TEXT_ALIGN_RIGHT
Text displayed in Text box is right aligned. |
| Fields inherited from class java.awt.TextComponent |
textListener |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PSPNum()
Default constructor - no parameters. |
|
PSPNum(int cols)
Simplest constructor - size of edit box only. |
|
PSPNum(int cols,
int DigitsBeforeDP,
int DigitsAfterDP)
Constructor with size of edit box and size of number. |
|
PSPNum(int cols,
int DigitsBeforeDP,
int DigitsAfterDP,
java.lang.String Value)
Constructor with sizes of edit box, number; also initial numeric value. |
|
| Method Summary | |
void |
add(PSPNum addNum)
Add decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
add(java.lang.String addValue)
Add parameter decimal value to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
The propertyChange method of the specified (parameter) PropertyChangeListener will be called each time the value of any bound property is changed. |
void |
divide(PSPNum divNum)
Divide decimal value of parameter PSPNum into this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
divide(java.lang.String divValue)
Divide parameter decimal value into this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
dump()
Utility function to dump PSPNum persistent property values to 'stdout' via 'System.out.println' call. |
void |
focusGained(java.awt.event.FocusEvent evt)
Method invoked when PSPNum gains input focus. |
void |
focusLost(java.awt.event.FocusEvent evt)
Method invoked when PSPNum loses input focus. |
java.awt.Color |
getActiveBackColor()
Returns active background color. |
int |
getCaretPosition()
Gets the position of the text insertion caret for this PSPNum. |
protected int |
getColumnWidth()
Gets the column width. |
int |
getDigitsAfterDP()
Returns number of digits after decimal place. |
int |
getDigitsBeforeDP()
Returns number of digits before decimal place. |
java.lang.String |
getMask()
Returns all components of edit mask. |
java.lang.String |
getMaskUsed()
Returns used components of edit mask. |
int |
getOverflowCode()
Returns current OverflowCode flag setting for overflow following program operations. |
int |
getOverflowKey()
Returns current OverflowKey flag setting for overflow following user keying. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this PSPNum. |
boolean |
getRound()
Returns setting (true/false) for arithmetic rounding. |
java.lang.String |
getText()
Returns the Text for this PSPNum (trimmed to remove leading/trailing whitespace). |
int |
getTextAlign()
Returns current TextAlign flag setting. |
boolean |
getTextRefresh()
Get current state of TextRefresh boolean variable. |
java.lang.String |
getValue()
Returns unformatted decimal numeric value. |
boolean |
isEQ(PSPNum compareNum)
Checks if this PSPNum is EQ another PSPNum. |
boolean |
isEQ(java.lang.String compareValue)
Checks if this PSPNum is EQ a particular numeric value. |
boolean |
isGE(PSPNum compareNum)
Checks if this PSPNum is GE another PSPNum. |
boolean |
isGE(java.lang.String compareValue)
Checks if this PSPNum is GE a particular numeric value. |
boolean |
isGT(PSPNum compareNum)
Checks if this PSPNum is GT another PSPNum. |
boolean |
isGT(java.lang.String compareValue)
Checks if this PSPNum is GT a particular numeric value. |
boolean |
isLE(PSPNum compareNum)
Checks if this PSPNum is LE another PSPNum. |
boolean |
isLE(java.lang.String compareValue)
Checks if this PSPNum is LE a particular numeric value. |
boolean |
isLT(PSPNum compareNum)
Checks if this PSPNum is LT another PSPNum. |
boolean |
isLT(java.lang.String compareValue)
Checks if this PSPNum is LT a particular numeric value. |
boolean |
isNE(PSPNum compareNum)
Checks if this PSPNum is NE another PSPNum. |
boolean |
isNE(java.lang.String compareValue)
Checks if this PSPNum is NE a particular numeric value. |
boolean |
isNegative()
Check if the number is negative. |
boolean |
isPositive()
Check if the number is positive. |
boolean |
isZero()
Check if the number is zero. |
void |
lostOwnership(java.awt.datatransfer.Clipboard cb,
java.awt.datatransfer.Transferable data)
method required to be present only for system Clipboard Interface support - does nothing for PSPNum. |
void |
multiply(PSPNum multNum)
Multiply this PSPNum by decimal value of parameter PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively |
void |
multiply(java.lang.String multValue)
Multiply this PSPNum by parameter decimal value with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
protected void |
processKeyEvent(java.awt.event.KeyEvent evt)
Keystroke processing - filters out keys inapplicable to decimal numbers. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove specified (parameter) PropertyChangeListener from the PSPNum's internal list of PropertyChangeListeners. |
void |
select(int selectionStart,
int selectionEnd)
Selects the text between the specified start and end positions. |
void |
selectAll()
Selects all the text in this text component. |
void |
setActiveBackColor(java.awt.Color newBackColor)
Set background color for PSPNum when it has the input focus (is the active control). |
void |
setCaretPosition(int newPosition)
Sets the position of the text insertion caret for this PSPNum. |
void |
setCaretRelativePosition(int newRelativePosition)
Set caret position for this PSPNum (not for entire class) to relative position given by either CARET_POSITION_FIRSTDIGIT or CARET_POSITION_DECIMAL. |
void |
setDigitsAfterDP(int newDigitsAfterDP)
Resets number of digits after decimal place (revise number of digits set initially when PSPNum constructed). |
void |
setDigitsBeforeDP(int newDigitsBeforeDP)
Reset number of digits before decimal place (revise number of digits set initially when PSPNum constructed). |
void |
setFocusCaretRelativePosition(int newRelativePosition)
Set desired relative positioning of caret for this PSPNum (not for entire class) when it gains the input focus. |
void |
setFont(java.awt.Font f)
Sets the current font. |
void |
setMask(java.lang.String newMask)
Resets edit mask controlling display of formatted value in text box and the keystrokes recognised for input. |
void |
setOverflowCode(int newCode)
Set flag for this PSPNum (not for entire class) to control response to numeric overflow when new value set by program operations. |
void |
setOverflowDefault(byte overflowDefault)
Set flag for PSPNum class (default applied to new PSPNum's) to control response to numeric overflow when new value set by program operations or user keying. |
void |
setOverflowKey(int newKey)
Set flag for this PSPNum (not for entire class) to control response to numeric overflow when user keys new value. |
void |
setRound(boolean newRound)
Set default true/false value for arithmetic rounding of new numeric values assigned in code (does not apply to keystrokes). |
void |
setText(java.lang.String newText)
Dummy function to reset Text for PSPNum; deliberately does nothing - PSPNum value must be reset using setValue(). |
void |
setTextAlign(int newAlign)
Set alignment for Text displayed in Text box for this PSPNum (not for entire class). |
void |
setTextRefresh(boolean refresh)
Controls whether Text is refreshed whenever the underlying Value - per getValue() function - changes. |
void |
setValue(PSPNum assnNum)
Assigns decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively |
void |
setValue(PSPNum assnNum,
int Overflow,
boolean Round)
Assigns decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by last two parameters (temporary override values set by preceding setOverflowCode() and setRound() methods). |
void |
setValue(java.lang.String assnValue)
Assign parameter decimal value to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
setValue(java.lang.String assnValue,
int Overflow,
boolean Round)
Assign parameter decimal value to this PSPNum with treatment of overflow and rounding determined by last two parameters. |
int |
signum()
Returns the signum function of this number |
void |
subtract(PSPNum subNum)
Subtract decimal value of parameter PSPNum from this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
subtract(java.lang.String subValue)
Subtract parameter decimal value from this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
java.lang.String |
toString()
Returns a String object representing this PSPNum's value - which is the decimal value also returned by the getValue() method. |
| Methods inherited from class java.awt.TextField |
addActionListener, addNotify, echoCharIsSet, getAccessibleContext, getActionListeners, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, minimumSize, minimumSize, paramString, preferredSize, preferredSize, processActionEvent, processEvent, removeActionListener, setColumns, setEchoChar, setEchoCharacter |
| Methods inherited from class java.awt.TextComponent |
addTextListener, enableInputMethods, getBackground, getSelectedText, getSelectionEnd, getSelectionStart, getTextListeners, isEditable, processTextEvent, removeNotify, removeTextListener, setBackground, setEditable, setSelectionEnd, setSelectionStart |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAX_DIGITS_BEFORE
public static final int MAX_DIGITS_AFTER
public static final int OVERFLOW_BUMP_BEFOREDP
public static final int OVERFLOW_EXCEPTION
public static final int OVERFLOW_IGNORE
public static final int OVERFLOW_IGNORE_BEEP
public static final int OVERFLOW_TRUNCATE
public static final int OVERFLOW_TRUNCATE_BEEP
public static final int TEXT_ALIGN_RIGHT
public static final int TEXT_ALIGN_CENTER
public static final int TEXT_ALIGN_LEFT
public static final int CARET_POSITION_DEFAULT
public static final int CARET_POSITION_FIRSTDIGIT
public static final int CARET_POSITION_DECIMAL
| Constructor Detail |
public PSPNum()
public PSPNum(int cols)
cols - The size (number of columns) of the edit box.
public PSPNum(int cols,
int DigitsBeforeDP,
int DigitsAfterDP)
cols - The size (number of columns) of the edit box.DigitsBeforeDP - Number of digits before decimal place.DigitsAfterDP - Number of digits after decimal place.
public PSPNum(int cols,
int DigitsBeforeDP,
int DigitsAfterDP,
java.lang.String Value)
cols - The size (number of columns) of the edit box.DigitsBeforeDP - Number of digits before decimal place.DigitsAfterDP - Number of digits after decimal place.Value - Initial decimal numeric value for PSPNum.| Method Detail |
protected int getColumnWidth()
public void setFont(java.awt.Font f)
setFont in class java.awt.Componentf - the new fontpublic void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class java.awt.Componentl - the PropertyChangeListenerremovePropertyChangeListener(java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class java.awt.Componentl - the PropertyChangeListeneraddPropertyChangeListener(java.beans.PropertyChangeListener)public final int getDigitsBeforeDP()
public final void setDigitsBeforeDP(int newDigitsBeforeDP)
newDigitsBeforeDP - New digits before decimal place.public final int getDigitsAfterDP()
public final void setDigitsAfterDP(int newDigitsAfterDP)
newDigitsAfterDP - New digits after decimal place.public final int getTextAlign()
public final void setTextAlign(int newAlign)
throws java.lang.IllegalArgumentException
newAlign - Flag controlling Text alignment.
java.lang.IllegalArgumentException - if parameter newAlign is not one of valid TEXT_ALIGN_xxx values.public final void setText(java.lang.String newText)
setText in class java.awt.TextFieldnewText - New text (ignored).public final java.lang.String getText()
getText in class java.awt.TextComponentpublic final void setTextRefresh(boolean refresh)
refresh - true/false if Text to be refreshed
when underlying decimal numeric value changes.public final boolean getTextRefresh()
public final java.lang.String getMaskUsed()
public final java.lang.String getMask()
public final void setMask(java.lang.String newMask)
newMask - New mask values (changed components)public final java.awt.Color getActiveBackColor()
public final void setActiveBackColor(java.awt.Color newBackColor)
newBackColor - New active background color.public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.TextFieldpublic void focusGained(java.awt.event.FocusEvent evt)
focusGained in interface java.awt.event.FocusListenerevt - FocusEvent generated for receipt of input focus.public void focusLost(java.awt.event.FocusEvent evt)
focusLost in interface java.awt.event.FocusListenerevt - FocusEvent generated for loss of input focus.public final int getCaretPosition()
getCaretPosition in class java.awt.TextComponent
public void setCaretPosition(int newPosition)
throws java.lang.IllegalArgumentException
setCaretPosition in class java.awt.TextComponentnewPosition - the position of the text insertion caret where
zero denotes first position of displayed Text.
java.lang.IllegalArgumentException - if the value supplied for newPosition is less than zero.
public final void setCaretRelativePosition(int newRelativePosition)
throws java.lang.IllegalArgumentException
newRelativePosition - Flag controlling relative position caret
to be set to now.
java.lang.IllegalArgumentException - if parameter newRelativePosition is not one of the valid CARET_POSITION_xxx values.
public final void setFocusCaretRelativePosition(int newRelativePosition)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if parameter newCaretPosition is not one of the valid CARET_POSITION_xxx values.public final boolean getRound()
public final void setRound(boolean newRound)
public final int getOverflowCode()
public final void setOverflowCode(int newCode)
throws java.lang.IllegalArgumentException
newCode - Flag controlling overflow response.
java.lang.IllegalArgumentException - if parameter newCode is not one of the valid OVERFLOW_xxx values.public final int getOverflowKey()
public final void setOverflowKey(int newKey)
throws java.lang.IllegalArgumentException
newKey - Flag controlling overflow response.
java.lang.IllegalArgumentException - if parameter newKey is not one of the valid OVERFLOW_xxx values.public void setOverflowDefault(byte overflowDefault)
overflowDefault - Flag controlling default overflow response.protected void processKeyEvent(java.awt.event.KeyEvent evt)
processKeyEvent in class java.awt.Componentevt - Event generated for keying.
public final void lostOwnership(java.awt.datatransfer.Clipboard cb,
java.awt.datatransfer.Transferable data)
lostOwnership in interface java.awt.datatransfer.ClipboardOwnercb - Object representing the system clipboard.data - Contents of the clipboard.
public void select(int selectionStart,
int selectionEnd)
This method sets the start and end positions of the selected text, enforcing the restriction that the start position must be greater than or equal to zero. The end position must be greater than or equal to the start position, and less than or equal to the length of the text component's text. The character positions are indexed starting with zero. The length of the selection is endPosition-startPosition, so the character at endPosition is not selected. If the start and end positions of the selected text are equal, all text is deselected.
If the caller supplies values that are inconsistent or out of bounds, the method enforces these constraints silently, and without failure. Specifically, if the start position or end position is greater than the length of the text, it is reset to equal the text length. If the start position is less than zero, it is reset to zero, and if the end position is less than the start position, it is reset to the start position.
select in class java.awt.TextComponentselectionStart - the zero-based index of the first
character to be selected.selectionEnd - the zero-based end position of the
text to be selected. The character at
selectionEnd is not selected.TextComponent.setSelectionStart(int),
TextComponent.setSelectionEnd(int),
TextComponent.selectAll()public void selectAll()
selectAll in class java.awt.TextComponentTextComponent.select(int, int)public final java.lang.String toString()
toString in class java.awt.Componentpublic final java.lang.String getValue()
public final void setValue(java.lang.String assnValue)
throws PSPException
assnValue - New decimal numeric value.
PSPException - if parameter assnValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void setValue(java.lang.String assnValue,
int Overflow,
boolean Round)
throws java.lang.IllegalArgumentException,
PSPException
assnValue - New decimal numeric value.Overflow - One of OVERFLOW_xxx field values for treatment of overflow.Round - true/false for arithmetic rounding.
java.lang.IllegalArgumentException - if Overflow parameter is not one of the valid OVERFLOW_xxx values.
PSPException - if parameter assnValue (after trimming) has extraneous character.
PSPException - if overflow occurs and Overflow parameter set to OVERFLOW_EXCEPTION.
public final void setValue(PSPNum assnNum)
throws PSPException
assnNum - Number whose value to be assigned.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void setValue(PSPNum assnNum,
int Overflow,
boolean Round)
throws java.lang.IllegalArgumentException,
PSPException
assnNum - Number whose value to be assigned.Overflow - One of OVERFLOW_xxx field values for treatment of overflow.Round - true/false for arithmetic rounding.
java.lang.IllegalArgumentException - if Overflow parameter is not one of the valid OVERFLOW_xxx values.
PSPException - if overflow occurs and Overflow parameter set to OVERFLOW_EXCEPTION.
public final void add(PSPNum addNum)
throws PSPException
addNum - Number whose value to be added.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void add(java.lang.String addValue)
throws PSPException
addValue - Value to be added.
PSPException - if parameter addValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void subtract(PSPNum subNum)
throws PSPException
subNum - Number whose value to be subtracted.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void subtract(java.lang.String subValue)
throws PSPException
subValue - Value to be subtracted.
PSPException - if parameter subValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void multiply(PSPNum multNum)
throws PSPException
multNum - Number whose value to be multiplied by.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void multiply(java.lang.String multValue)
throws PSPException
multValue - Value to be multiplied by.
PSPException - if parameter multValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void divide(PSPNum divNum)
throws java.lang.ArithmeticException,
PSPException
divNum - Number whose value to be divided by.
java.lang.ArithmeticException - if parameter divNum has zero value.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void divide(java.lang.String divValue)
throws java.lang.ArithmeticException,
PSPException
divValue - Value to be divided by.
PSPException - if parameter divValue (after trimming) has extraneous character.
java.lang.ArithmeticException - if parameter divValue has zero value.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.public final int signum()
public final boolean isPositive()
public final boolean isNegative()
public final boolean isZero()
public final boolean isEQ(PSPNum compareNum)
public final boolean isEQ(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isNE(PSPNum compareNum)
public final boolean isNE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isGT(PSPNum compareNum)
public final boolean isGT(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isLT(PSPNum compareNum)
public final boolean isLT(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isGE(PSPNum compareNum)
public final boolean isGE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isLE(PSPNum compareNum)
public final boolean isLE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public void dump()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||