Class AttributePathImpl

    • Constructor Detail

      • AttributePathImpl

        public AttributePathImpl()

        Constructor for AttributePathImpl.

    • Method Detail

      • attributeAt

        public String attributeAt​(int index)

        attributeAt.

        Specified by:
        attributeAt in interface AttributePath
        Parameters:
        index - a int
        Returns:
        Attribute name at the specified index or null if the index not exists.
      • hasSameValueAsIn

        public boolean hasSameValueAsIn​(Object other)
        Compares the complete attribute path to another one and checks, if they have the same attributes
        Specified by:
        hasSameValueAsIn in interface AttributePath
        Parameters:
        other - an other attribute path
        Returns:
        true, if both attribute paths have the same attributes
      • fromString

        public void fromString​(String attributePath)
        Converts the given attribute path as string into this attribute path. Existing attributes are removed first.
        Specified by:
        fromString in interface AttributePath
        Parameters:
        attributePath - The attribute path as string thats overwrite this attribute path object.
      • hashCode

        public int hashCode()
        hashCode that combines all attributes
        Overrides:
        hashCode in class Object
      • isEmpty

        public boolean isEmpty()

        isEmpty.

        Specified by:
        isEmpty in interface AttributePath
        Returns:
        true if the attribute path is empty
      • peek

        public String peek()
        Looks at the attribute name at the end of this path without removing it from the path.
        Specified by:
        peek in interface AttributePath
        Returns:
        the attribute name at the end of this path
      • peekFirst

        public String peekFirst()
        Looks at the first attribute name of this path without removing it from the path.
        Specified by:
        peekFirst in interface AttributePath
        Returns:
        the attribute name at the end of this path
      • pop

        public String pop()
        Removes the attribute at the end of this path and returns that attribute name as the value of this function.
        Specified by:
        pop in interface AttributePath
        Returns:
        The attribute name at the end of this path.
      • popFirst

        public String popFirst()
        Removes the first attribute of this path and returns that attribute name as the value of this function.
        Specified by:
        popFirst in interface AttributePath
        Returns:
        The attribute name at the end of this path.
      • push

        public void push​(String attributeName)
        Pushes an attribute name onto the top of this path.
        Specified by:
        push in interface AttributePath
        Parameters:
        attributeName - the attribute name to be pushed at the end of the path.
      • size

        public int size()

        size.

        Specified by:
        size in interface AttributePath
        Returns:
        the number of attributes in this attribute path
      • toString

        public String toString()
        Converts the attribute path into a string. The inverse method is AttributePath.fromString().
        Specified by:
        toString in interface AttributePath
        Overrides:
        toString in class Object