Skip navigation links


oracle.idm.util.progress.info
Class PercentInfo

java.lang.Object
  extended by oracle.idm.util.progress.info.PercentInfo

All Implemented Interfaces:
java.lang.Cloneable, XmlPrintable

public class PercentInfo
extends java.lang.Object
implements java.lang.Cloneable, XmlPrintable

PercentInfo represents information about the percent of completion of operation. For example, it may report that curently 50.0% of total 100.0% of operation has been executed.


Field Summary
static float TOTAL
          TOTAL has a value of 100.0F and indicates total percent.
static float UNKNOWN
          UNKNOWN has a value of -1.0F and indicates unknown percent.

 

Constructor Summary
PercentInfo(float current)
          Creates PercentInfo.

 

Method Summary
 java.lang.Object clone()
          Clones PercentInfo.
 float getCurrent()
          Getter for the current property.
 float getTotal()
          Getter for the total property.
 void setCurrent(float current)
          Setter for the current property.
 java.lang.String toString()
          Returns a string representation of PercentInfo.
 void xprint(XmlPrintWriter out)
          Prints percentInfo properties to the PrintWriter as an XML element.

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

UNKNOWN

public static final float UNKNOWN
UNKNOWN has a value of -1.0F and indicates unknown percent.
See Also:
Constant Field Values

TOTAL

public static final float TOTAL
TOTAL has a value of 100.0F and indicates total percent.
See Also:
Constant Field Values

Constructor Detail

PercentInfo

public PercentInfo(float current)
Creates PercentInfo.
Parameters:
current - Current percent of operation executed so far.

Method Detail

clone

public java.lang.Object clone()
Clones PercentInfo.
Overrides:
clone in class java.lang.Object

getCurrent

public float getCurrent()
Getter for the current property. Value of UNKNOWN indicates unknown current percent.
Returns:
Current percent of operation executed so far.

setCurrent

public void setCurrent(float current)
Setter for the current property. Use value of UNKNOWN to indicate unknown current percent.
Parameters:
current - Current percent of operation executed so far.

getTotal

public float getTotal()
Getter for the total property.
Returns:
This method always returns TOTAL (100.0).

xprint

public void xprint(XmlPrintWriter out)
Prints percentInfo properties to the PrintWriter as an XML element.
Specified by:
xprint in interface XmlPrintable
Parameters:
out - PrintWriter for printing percentInfo propeties.

toString

public java.lang.String toString()
Returns a string representation of PercentInfo.
Overrides:
toString in class java.lang.Object

Skip navigation links