89 this.theProp = theProp;
90 this.defaultVal = defaultVal;
91 this.defaultSet = true;
92 }
93
94 /**
95 * Determines the <code>Long</code> value of the system property whose
96 * name was specified in the constructor.
97 *
98 * <p>If there is no property of the specified name, or if the property
99 * does not have the correct numeric format, then a <code>Long</code>
100 * object representing the default value that was specified in the
101 * constructor is returned, or <code>null</code> if no default value was
102 * specified.
103 *
104 * @return the <code>Long</code> value of the property.
105 */
106 public Long run() {
107 Long value = Long.getLong(theProp);
108 if ((value == null) && defaultSet)
109 return new Long(defaultVal);
110 return value;
111 }
112 }
|
89 this.theProp = theProp;
90 this.defaultVal = defaultVal;
91 this.defaultSet = true;
92 }
93
94 /**
95 * Determines the <code>Long</code> value of the system property whose
96 * name was specified in the constructor.
97 *
98 * <p>If there is no property of the specified name, or if the property
99 * does not have the correct numeric format, then a <code>Long</code>
100 * object representing the default value that was specified in the
101 * constructor is returned, or <code>null</code> if no default value was
102 * specified.
103 *
104 * @return the <code>Long</code> value of the property.
105 */
106 public Long run() {
107 Long value = Long.getLong(theProp);
108 if ((value == null) && defaultSet)
109 return defaultVal;
110 return value;
111 }
112 }
|