org.xwiki.model.reference
Class RegexEntityReference
java.lang.Object
org.xwiki.model.reference.EntityReference
org.xwiki.model.reference.RegexEntityReference
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<EntityReference>
public class RegexEntityReference
- extends EntityReference
An 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
equals(Object) method behave as usual and then call following member equals(Object) etc.
- Since:
- 3.2M1
- Version:
- $Id$
- See Also:
- Serialized Form
| Methods inherited from class org.xwiki.model.reference.EntityReference |
appendParent, compareTo, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, replaceParent, setName, setParameter, setParameters, setParent, setType, toString |
RegexEntityReference
public RegexEntityReference(Pattern pattern,
EntityType type)
- Parameters:
pattern - the pattern used to match the nametype - the type of the reference
RegexEntityReference
public RegexEntityReference(Pattern pattern,
EntityType type,
EntityReference parent)
- Parameters:
pattern - the pattern used to match the nametype - the type of the referenceparent - the parent of the reference
getPattern
public Pattern getPattern()
- Returns:
- the pattern used to match the name
hashCode
public int hashCode()
- Overrides:
hashCode in class EntityReference
equals
public boolean equals(Object obj)
-
This equals method actually matches provided reference using patterns.
- Overrides:
equals in class EntityReference
- See Also:
EntityReference.equals(java.lang.Object)
Copyright © 2004-2011 XWiki. All Rights Reserved.