Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.emory.mathcs.util.security.action
Class GetLongAction  view GetLongAction download GetLongAction.java

java.lang.Object
  extended byedu.emory.mathcs.util.security.action.GetLongAction
All Implemented Interfaces:
java.security.PrivilegedAction

public class GetLongAction
extends java.lang.Object
implements java.security.PrivilegedAction

A convenience class for retrieving the long value of a system property as a privileged action.


Field Summary
private  boolean defaultSet
           
private  long defaultVal
           
private  java.lang.String prop
           
 
Constructor Summary
GetLongAction(java.lang.String prop)
          Constructor that takes the name of the system property whose long value needs to be determined.
GetLongAction(java.lang.String prop, long defaultVal)
          Constructor that takes the name of the system property and the default value to be used when property is not set.
 
Method Summary
 java.lang.Object run()
          Determines the long value of the system property whose name was specified in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prop

private java.lang.String prop

defaultVal

private long defaultVal

defaultSet

private boolean defaultSet
Constructor Detail

GetLongAction

public GetLongAction(java.lang.String prop)
Constructor that takes the name of the system property whose long value needs to be determined.


GetLongAction

public GetLongAction(java.lang.String prop,
                     long defaultVal)
Constructor that takes the name of the system property and the default value to be used when property is not set.

Method Detail

run

public java.lang.Object run()
Determines the long value of the system property whose name was specified in the constructor.

If there is no property of the specified name, or if the property does not have the correct numeric format, then an Long object representing the default value that was specified in the constructor is returned, or null if no default value was specified.

Specified by:
run in interface java.security.PrivilegedAction