Class AttributePathImpl
java.lang.Object
de.uni_trier.wi2.procake.data.model.base.impl.AttributePathImpl
- All Implemented Interfaces:
AttributePath
Implementation of
AttributePath
.- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.AttributePath
DELIMITER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributeAt
(int index) attributeAt.deepCopy()
deepCopy.void
fromString
(String attributePath) Converts the given attribute path as string into this attribute path.int
hashCode()
boolean
hasSameValueAsIn
(Object other) Compares the complete attribute path to another one and checks, if they have the same attributesboolean
isEmpty()
isEmpty.peek()
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.popFirst()
Removes the first attribute of this path and returns that attribute name as the value of this function.void
Pushes an attribute name onto the top of this path.int
size()
size.toString()
-
Constructor Details
-
AttributePathImpl
public AttributePathImpl()Constructor for AttributePathImpl.
-
-
Method Details
-
attributeAt
attributeAt.
- Specified by:
attributeAt
in interfaceAttributePath
- Parameters:
index
- a int- Returns:
- Attribute name at the specified index or null if the index not exists.
-
deepCopy
deepCopy.
- Specified by:
deepCopy
in interfaceAttributePath
- Returns:
- a new AttributePath with the same attribute names.
-
hasSameValueAsIn
Compares the complete attribute path to another one and checks, if they have the same attributes- Specified by:
hasSameValueAsIn
in interfaceAttributePath
- Parameters:
other
- an other attribute path- Returns:
- true, if both attribute paths have the same attributes
-
fromString
Converts the given attribute path as string into this attribute path. Existing attributes are removed first.- Specified by:
fromString
in interfaceAttributePath
- Parameters:
attributePath
- The attribute path as string thats overwrite this attribute path object.
-
hashCode
public int hashCode()hashCode that combines all attributes
-
isEmpty
public boolean isEmpty()isEmpty.
- Specified by:
isEmpty
in interfaceAttributePath
- Returns:
- true if the attribute path is empty
-
peek
Looks at the attribute name at the end of this path without removing it from the path.- Specified by:
peek
in interfaceAttributePath
- Returns:
- the attribute name at the end of this path
-
peekFirst
Looks at the first attribute name of this path without removing it from the path.- Specified by:
peekFirst
in interfaceAttributePath
- Returns:
- the attribute name at the end of this path
-
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 interfaceAttributePath
- Returns:
- The attribute name at the end of this path.
-
popFirst
Removes the first attribute of this path and returns that attribute name as the value of this function.- Specified by:
popFirst
in interfaceAttributePath
- Returns:
- The attribute name at the end of this path.
-
push
Pushes an attribute name onto the top of this path.- Specified by:
push
in interfaceAttributePath
- Parameters:
attributeName
- the attribute name to be pushed at the end of the path.
-
size
public int size()size.
- Specified by:
size
in interfaceAttributePath
- Returns:
- the number of attributes in this attribute path
-
toString
Converts the attribute path into a string. The inverse method is
AttributePath.fromString()
.- Specified by:
toString
in interfaceAttributePath
- Overrides:
toString
in classObject
-