Interface AttributePath
-
- All Known Implementing Classes:
AttributePathImpl
public interface AttributePathAn 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:
AggregateObject.resolveAttributeClass(AttributePath),AggregateObject.resolveAttributeValue(AttributePath)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringattributeAt(int index)attributeAt.AttributePathdeepCopy()deepCopy.voidfromString(String attributePath)Converts the given attribute path as string into this attribute path.booleanhasSameValueAsIn(Object other)Compares the complete attribute path to another one and checks, if they have the same attributesbooleanisEmpty()isEmpty.Stringpeek()Looks at the attribute name at the end of this path without removing it from the path.StringpeekFirst()Looks at the first attribute name of this path without removing it from the path.Stringpop()Removes the attribute at the end of this path and returns that attribute name as the value of this function.StringpopFirst()Removes the first attribute of this path and returns that attribute name as the value of this function.voidpush(String attributeName)Pushes an attribute name onto the top of this path.intsize()size.StringtoString()Converts the attribute path into a string.
-
-
-
Field Detail
-
DELIMITER
static final String DELIMITER
ConstantDELIMITER="::"- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-