Methods Summary |
---|
public java.lang.String | getMessage()
return ( mMessage );
|
public int | getPercentage()Returns the percentage indicating amount of work done.
return ( mPercentage );
|
public boolean | isFinished()Returns a boolean indicating whether the work is finished.
return ( mIsFinished );
|
public void | setIsFinished(boolean finished)Sets the state to finished or unfinished. If the parameter is true,
the internal state of the Object will be modified to show the percentage
as 100.
mIsFinished = finished;
if (finished)
{
setPercentage(100);
}
|
public void | setPercentage(int percentage)Sets the percentage to given value. The value may not be greater than
100 or less than 0. If the value is 100, the internal state of this
Object will be set to finished.
if (percentage < 0 || percentage > 100)
{
throw new IllegalArgumentException();
}
mPercentage = percentage;
if (percentage == 100)
{
mIsFinished = true;
}
|