ncsa.tools.ogrescript.tasks.string
Class AddLeadingZeros

java.lang.Object
  extended byncsa.tools.ogrescript.OgreScriptElement
      extended byncsa.tools.ogrescript.tasks.OgreScriptBaseTask
          extended byncsa.tools.ogrescript.tasks.OgreScriptTask
              extended byncsa.tools.ogrescript.tasks.string.AddLeadingZeros
All Implemented Interfaces:
IIdentifiable, ITask, UserFacing

public class AddLeadingZeros
extends OgreScriptTask

Converts a number into a String with the given (maximum) number of leading 0's.

Examples:

(a) with places = 4, 4.2483 >> "0004.2483", 361 >> "0361", -0.3423 >> "-0000.3423", 53764 > "53764", etc.;

(b) with places = 1, 0.753 >> 0.753; .853 >> 0.853; -.2 >> -0.2, etc.;

(C) with places = 0, 0.753 >> .753; .853 >> .853, etc.

Author:
Albert L. Rossi

Field Summary
static java.lang.String TAG_RETURNS
           
static java.lang.String TAG_SELF
           
 
Fields inherited from class ncsa.tools.ogrescript.tasks.OgreScriptBaseTask
TAG_EXT_PT, TAG_REQUIRED
 
Constructor Summary
AddLeadingZeros()
           
 
Method Summary
 void setDeclare(boolean global)
           
 void setGlobal(boolean global)
           
 void setName(java.lang.String name)
           
 void setNumber(java.lang.Object number)
           
 void setPlaces(int i)
           
 
Methods inherited from class ncsa.tools.ogrescript.tasks.OgreScriptTask
addReturnValue, getReturnValues, setReturnValues
 
Methods inherited from class ncsa.tools.ogrescript.tasks.OgreScriptBaseTask
execute, getInstanceId, getPlugin, getScript, getTaskId, getTaskName, setEnvironment, setInstanceId, setScript, setTaskId, setTaskName, toString
 
Methods inherited from class ncsa.tools.ogrescript.OgreScriptElement
asElement, initializeFromElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ncsa.tools.common.UserFacing
asElement, initializeFromElement
 

Field Detail

TAG_SELF

public static final java.lang.String TAG_SELF
See Also:
Constant Field Values

TAG_RETURNS

public static final java.lang.String TAG_RETURNS
See Also:
Constant Field Values
Constructor Detail

AddLeadingZeros

public AddLeadingZeros()
Method Detail

setPlaces

public void setPlaces(int i)
Parameters:
i - fill with zeros out to this many places left of the decimal point.

setNumber

public void setNumber(java.lang.Object number)

setName

public void setName(java.lang.String name)

setGlobal

public void setGlobal(boolean global)

setDeclare

public void setDeclare(boolean global)