Class FlatPathDto
- java.lang.Object
-
- org.ehrbase.webtemplate.path.flat.FlatPathDto
-
public final class FlatPathDto extends Object
-
-
Constructor Summary
Constructors Constructor Description FlatPathDto(CharSequence path)FlatPathDto(String name, FlatPathDto child, Integer count, String attributeName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FlatPathDtoaddEnd(FlatPathDto path, FlatPathDto add)booleanequals(Object o)Stringformat()static <T> Map.Entry<FlatPathDto,T>get(Map<FlatPathDto,T> map, String otherPath)StringgetAttributeName()FlatPathDtogetChild()IntegergetCount()FlatPathDtogetLast()StringgetName()inthashCode()booleanisEqualTo(CharSequence otherPath)Forcount0 and null are considered equal.booleanisEqualTo(FlatPathDto otherPath)booleanisEqualTo(FlatPathDto otherPath, boolean ignoreCount, boolean ignoreAttribute)static booleanisEqualTo(FlatPathDto me, FlatPathDto other, boolean ignoreCount, boolean ignoreAttribute)static booleanisNodeEqual(FlatPathDto me, FlatPathDto other)static booleanisNodeEqual(FlatPathDto me, FlatPathDto other, boolean ignoreCount, boolean ignoreAttribute)FlatPathDtonodeWithAttributeName(String attributeName)Clones this node and sets the attributeName propertyFlatPathDtonodeWithChild(FlatPathDto child)Clones this node and appends the childFlatPathDtonodeWithCount(Integer count)Clones this node and sets the count propertyFlatPathDtopathWithAttributeName(String attributeName)Clones the whole path and sets the attributeName property of the trailing nodeFlatPathDtopathWithChild(FlatPathDto child)Appends the child to a clone of this pathFlatPathDtopathWithCount(Integer count)Clones the whole path and sets the count property of the trailing nodestatic FlatPathDtoremoveEnd(FlatPathDto path, FlatPathDto remove)static FlatPathDtoremoveStart(FlatPathDto path, FlatPathDto remove)static FlatPathDtoreplaceEnd(FlatPathDto path, UnaryOperator<FlatPathDto> replacement)booleanstartsWith(CharSequence otherPath)booleanstartsWith(FlatPathDto other)StringtoString()
-
-
-
Constructor Detail
-
FlatPathDto
public FlatPathDto(CharSequence path)
-
FlatPathDto
public FlatPathDto(String name, FlatPathDto child, Integer count, String attributeName)
-
-
Method Detail
-
getName
public String getName()
-
getChild
public FlatPathDto getChild()
-
nodeWithChild
public FlatPathDto nodeWithChild(FlatPathDto child)
Clones this node and appends the child- Parameters:
child-- Returns:
-
pathWithChild
public FlatPathDto pathWithChild(FlatPathDto child)
Appends the child to a clone of this path- Parameters:
child-- Returns:
-
getAttributeName
public String getAttributeName()
-
nodeWithAttributeName
public FlatPathDto nodeWithAttributeName(String attributeName)
Clones this node and sets the attributeName property- Parameters:
attributeName-- Returns:
-
pathWithAttributeName
public FlatPathDto pathWithAttributeName(String attributeName)
Clones the whole path and sets the attributeName property of the trailing node- Parameters:
attributeName-- Returns:
-
getCount
public Integer getCount()
-
nodeWithCount
public FlatPathDto nodeWithCount(Integer count)
Clones this node and sets the count property- Parameters:
count-- Returns:
-
pathWithCount
public FlatPathDto pathWithCount(Integer count)
Clones the whole path and sets the count property of the trailing node- Parameters:
count-- Returns:
-
format
public String format()
-
getLast
public FlatPathDto getLast()
-
removeEnd
public static FlatPathDto removeEnd(FlatPathDto path, FlatPathDto remove)
-
replaceEnd
public static FlatPathDto replaceEnd(FlatPathDto path, UnaryOperator<FlatPathDto> replacement)
-
isNodeEqual
public static boolean isNodeEqual(FlatPathDto me, FlatPathDto other)
-
isNodeEqual
public static boolean isNodeEqual(FlatPathDto me, FlatPathDto other, boolean ignoreCount, boolean ignoreAttribute)
-
removeStart
public static FlatPathDto removeStart(FlatPathDto path, FlatPathDto remove)
-
addEnd
public static FlatPathDto addEnd(FlatPathDto path, FlatPathDto add)
-
startsWith
public boolean startsWith(CharSequence otherPath)
-
startsWith
public boolean startsWith(FlatPathDto other)
-
isEqualTo
public boolean isEqualTo(CharSequence otherPath)
Forcount0 and null are considered equal.- Parameters:
otherPath-- Returns:
-
isEqualTo
public boolean isEqualTo(FlatPathDto otherPath)
-
isEqualTo
public boolean isEqualTo(FlatPathDto otherPath, boolean ignoreCount, boolean ignoreAttribute)
-
isEqualTo
public static boolean isEqualTo(FlatPathDto me, FlatPathDto other, boolean ignoreCount, boolean ignoreAttribute)
-
get
public static <T> Map.Entry<FlatPathDto,T> get(Map<FlatPathDto,T> map, String otherPath)
-
-