public class RegexEntityReference extends PartialEntityReference
EntityReference used to match another one.
This EntityReference contains a Pattern which will tries to match provided EntityReference
name and type.
The RegexEntityReference can be partial or contain holes, for example if only the space regex reference is
provided it will tries to match only space part of the provided reference and consider other parts as matched.
It's of course possible to mix regex and "normal" EntityReference member. In that case normal member
PartialEntityReference.equals(Object) method behave as usual and then call following member PartialEntityReference.equals(Object) etc.
TOSTRING_SERIALIZER| Constructor and Description |
|---|
RegexEntityReference(Pattern pattern,
EntityType type) |
RegexEntityReference(Pattern pattern,
EntityType type,
EntityReference parent) |
| Modifier and Type | Method and Description |
|---|---|
Pattern |
getPattern() |
protected boolean |
isNameEqual(String name) |
equals, hashCodeappendParent, compareTo, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hasParent, removeParent, replaceParent, setName, setParameter, setParameters, setParent, setType, size, toStringpublic RegexEntityReference(Pattern pattern, EntityType type)
pattern - the pattern used to match the nametype - the type of the referencepublic RegexEntityReference(Pattern pattern, EntityType type, EntityReference parent)
pattern - the pattern used to match the nametype - the type of the referenceparent - the parent of the referencepublic Pattern getPattern()
protected boolean isNameEqual(String name)
isNameEqual in class PartialEntityReferencename - the name to compare to this nameCopyright © 2004–2017 XWiki. All rights reserved.