Class PropertyParser


  • public class PropertyParser
    extends Object
    PropertyParser
    Author:
    gagatust
    • Constructor Detail

      • PropertyParser

        public PropertyParser​(Properties properties)
    • Method Detail

      • getProperties

        public Properties getProperties()
      • setProperties

        public void setProperties​(Properties properties)
      • parseString

        public String parseString​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseInt

        public int parseInt​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseBoolean

        public boolean parseBoolean​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseFloat

        public float parseFloat​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseDouble

        public double parseDouble​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseLong

        public long parseLong​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • parseChar

        public char parseChar​(String name)
        Parse property.
        Parameters:
        name - property name
        Returns:
        property
      • toString

        public String toString​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toInt

        public int toInt​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toBoolean

        public boolean toBoolean​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toFloat

        public float toFloat​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toDouble

        public double toDouble​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toLong

        public long toLong​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toChar

        public char toChar​(String name)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        Returns:
        property
      • toString

        public String toString​(String name,
                               String defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toInt

        public int toInt​(String name,
                         int defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toBoolean

        public boolean toBoolean​(String name,
                                 boolean defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toFloat

        public float toFloat​(String name,
                             float defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toDouble

        public double toDouble​(String name,
                               double defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toLong

        public long toLong​(String name,
                           long defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property
      • toChar

        public char toChar​(String name,
                           char defaultValue)
        Get property. The method returns the default value if the property is not parsed.
        Parameters:
        name - property name
        defaultValue - default value
        Returns:
        property