Interface AttributePath

All Known Implementing Classes:
AttributePathImpl

public interface AttributePath
An AttriutePath represents a list of attribute names.

AggregateClasses can contain as attribute values further AggregateClasses. To identifiy an attribute, it is necessary to specify all attribute names from the top AggregateClass. This path of attributes can be expressed using the AttributePath.

Author:
Rainer Maximini
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant DELIMITER="::"
  • Method Summary

    Modifier and Type
    Method
    Description
    attributeAt(int index)
    attributeAt.
    deepCopy.
    void
    fromString(String attributePath)
    Converts the given attribute path as string into this attribute path.
    boolean
    Compares the complete attribute path to another one and checks, if they have the same attributes
    boolean
    isEmpty.
    Looks at the attribute name at the end of this path without removing it from the path.
    Looks at the first attribute name of this path without removing it from the path.
    pop()
    Removes the attribute at the end of this path and returns that attribute name as the value of this function.
    Removes the first attribute of this path and returns that attribute name as the value of this function.
    void
    push(String attributeName)
    Pushes an attribute name onto the top of this path.
    int
    size.
  • Field Details

  • Method Details

    • attributeAt

      String attributeAt(int index)

      attributeAt.

      Parameters:
      index - a int
      Returns:
      Attribute name at the specified index or null if the index not exists.
    • deepCopy

      AttributePath deepCopy()

      deepCopy.

      Returns:
      a new AttributePath with the same attribute names.
    • fromString

      void fromString(String attributePath)
      Converts the given attribute path as string into this attribute path. Existing attributes are removed first.
      Parameters:
      attributePath - The attribute path as string thats overwrite this attribute path object.
    • isEmpty

      boolean isEmpty()

      isEmpty.

      Returns:
      true if the attribute path is empty
    • peek

      String peek()
      Looks at the attribute name at the end of this path without removing it from the path.
      Returns:
      the attribute name at the end of this path
    • peekFirst

      String peekFirst()
      Looks at the first attribute name of this path without removing it from the path.
      Returns:
      the attribute name at the end of this path
    • pop

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

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

      void push(String attributeName)
      Pushes an attribute name onto the top of this path.
      Parameters:
      attributeName - the attribute name to be pushed at the end of the path.
    • size

      int size()

      size.

      Returns:
      the number of attributes in this attribute path
    • hasSameValueAsIn

      boolean hasSameValueAsIn(Object other)
      Compares the complete attribute path to another one and checks, if they have the same attributes
      Parameters:
      other - an other attribute path
      Returns:
      true, if both attribute paths have the same attributes
    • toString

      String toString()

      Converts the attribute path into a string. The inverse method is AttributePath.fromString().

      Overrides:
      toString in class Object