net.sf.sdedit.util
Class IntegerProperty

java.lang.Object
  extended by net.sf.sdedit.util.IntegerProperty

public final class IntegerProperty
extends Object

Utility class providing the getIntegerProperty(int, Properties, String) method.

Author:
Markus Strauch

Method Summary
static int getIntegerProperty(int dflt, Properties properties, String propertyName)
          Returns the value of a property, converted to an int.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIntegerProperty

public static int getIntegerProperty(int dflt,
                                     Properties properties,
                                     String propertyName)
Returns the value of a property, converted to an int. If the property is not set or is not convertable to an int, it it set to a default value.

Parameters:
dflt - a default value of the property
properties - a Properties object
propertyName - a name of a property in properties
Returns:
the value of the property, converted to int, or dflt, if the value is not set or cannot be converted


Copyright © 2011. All Rights Reserved.