Class XNode


  • public class XNode
    extends Object
    Author:
    Clinton Begin
    • Method Detail

      • newXNode

        public XNode newXNode​(Node node)
      • getParent

        public XNode getParent()
      • getPath

        public String getPath()
      • getValueBasedIdentifier

        public String getValueBasedIdentifier()
      • evalString

        public String evalString​(String expression)
      • evalBoolean

        public Boolean evalBoolean​(String expression)
      • evalDouble

        public Double evalDouble​(String expression)
      • evalNode

        public XNode evalNode​(String expression)
      • getNode

        public Node getNode()
      • getName

        public String getName()
      • getStringBody

        public String getStringBody()
      • getStringBody

        public String getStringBody​(String def)
      • getBooleanBody

        public Boolean getBooleanBody()
      • getIntBody

        public Integer getIntBody()
      • getLongBody

        public Long getLongBody()
      • getLongBody

        public Long getLongBody​(Long def)
      • getDoubleBody

        public Double getDoubleBody()
      • getDoubleBody

        public Double getDoubleBody​(Double def)
      • getFloatBody

        public Float getFloatBody()
      • getFloatBody

        public Float getFloatBody​(Float def)
      • getEnumAttribute

        public <T extends Enum<T>> T getEnumAttribute​(Class<T> enumType,
                                                      String name)
      • getEnumAttribute

        public <T extends Enum<T>> T getEnumAttribute​(Class<T> enumType,
                                                      String name,
                                                      T def)
      • getStringAttribute

        public String getStringAttribute​(String name,
                                         Supplier<String> defSupplier)
        Return a attribute value as String.

        If attribute value is absent, return value that provided from supplier of default value.

        Parameters:
        name - attribute name
        defSupplier - a supplier of default value
        Returns:
        the string attribute
        Since:
        3.5.4
      • getStringAttribute

        public String getStringAttribute​(String name)
      • getBooleanAttribute

        public Boolean getBooleanAttribute​(String name)
      • getIntAttribute

        public Integer getIntAttribute​(String name)
      • getLongAttribute

        public Long getLongAttribute​(String name)
      • getLongAttribute

        public Long getLongAttribute​(String name,
                                     Long def)
      • getDoubleAttribute

        public Double getDoubleAttribute​(String name)
      • getFloatAttribute

        public Float getFloatAttribute​(String name)
      • getFloatAttribute

        public Float getFloatAttribute​(String name,
                                       Float def)
      • getChildren

        public List<XNode> getChildren()
      • getChildrenAsProperties

        public Properties getChildrenAsProperties()