S O U R C E C O D E
/ 1998 / 06
/ java
/ 1.lst
/*********************************************************************/
/* File: Spinnable.java */
/* Purpose: Spinnable interface. */
/* */
/* A Spinnable item can be increment/decremented. It has a */
/* ³value. It also has a ³reset² value that becomes the value */
/* when resetSpin() is called. When udpateSpin() is called, the */
/* current value is loaded into the reset value. */
/* */
/* It is the duty of the implementation to set the initial value */
/* in the constructor. */
/*********************************************************************/
public interface Spinnable
{
// returns true is successful increment
public boolean incSpin();
// returns true if successful decrement
public boolean decSpin();
// resets spinnable item
public void resetSpin();
// gets a String representation of the item
public String toString();
// returns true if the String representation of the item is valid
public boolean validateSpin(String x);
// moves the current value into the reset value
public void updateSpin();
// get the minimum value of this Spinnable item
public String getMin();
// get the maximum value of this Spinnable item
public String getMax();
// set the minimum value of this Spinnable item
public boolean setMin(String x);
// Set the maximum value of this Spinnable item
public boolean setMax(String x);
}
|
HOME
|
CURRENT ISSUE
|
ARCHIVES
|
SOURCE CODE
|
EVENTS
|
CUSTOMER SERVICE
|
ADVERTISING
|
AUTHOR GUIDELINES
|
EDITORIAL CALENDAR
|
SEARCH
|
JOBS
|
ABOUT
Entire contents copyright 1996-2000 CMP Media Inc.
Read our privacy policy.