Exemplo n.º 1
0
 /**
  * Returns the boolean value of the passed property.
  *
  * @param name
  * @return
  */
 public boolean getBooleanProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Boolean.parseBoolean(val);
   } else {
     return Boolean.parseBoolean(property.getDefaultValue());
   }
 }
Exemplo n.º 2
0
 /**
  * Returns the double value of the passed property.
  *
  * @param name
  * @return
  */
 public double getDoubleProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Double.parseDouble(val);
   } else {
     return Double.parseDouble(property.getDefaultValue());
   }
 }
Exemplo n.º 3
0
 /**
  * Returns the float value of the passed property.
  *
  * @param name
  * @return
  */
 public float getFloatProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Float.parseFloat(val);
   } else {
     return Float.parseFloat(property.getDefaultValue());
   }
 }
Exemplo n.º 4
0
 /**
  * Returns the String value of the passed property
  *
  * @param name
  * @return
  */
 public String getProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return val;
   } else {
     return property.getDefaultValue();
   }
 }
Exemplo n.º 5
0
 /**
  * Returns the integer value of the passed property.
  *
  * @param name
  * @return
  */
 public int getIntegerProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     // look in properties
     return Integer.parseInt(val);
   } else {
     return Integer.parseInt(property.getDefaultValue());
   }
 }