Package org.robwork.sdurw
Class ProximitySetupRule
- java.lang.Object
 - 
- org.robwork.sdurw.ProximitySetupRule
 
 
- 
public class ProximitySetupRule extends java.lang.ObjectRule specifying include/exclude of frame pairs
The rule has two patterns, pattern A and pattern B, to which frames can be matched. A pattern
could contain a fully specified frame name such as "Table". It can also include
wild card characters such a "Robot.*" or regular expressions. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProximitySetupRule.RuleTypeInclude and Exclude identifiers 
- 
Constructor Summary
Constructors Constructor Description ProximitySetupRule()Constuct empty ruleProximitySetupRule(long cPtr, boolean cMemoryOwn)ProximitySetupRule(java.lang.String patternA, java.lang.String patternB, ProximitySetupRule.RuleType type)Constructs rule with patternA and patternB and type
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()booleanequals(ProximitySetupRule p)Compares if two rules are the samestatic longgetCPtr(ProximitySetupRule obj)StringPairgetPatterns()Returns the string patterns used to matchstatic ProximitySetupRulemakeExclude(java.lang.String patternA, java.lang.String patternB)Make an exclude rule for the patternsstatic ProximitySetupRulemakeExclude(StringPair patterns)Make an exclude rule for the patternsstatic ProximitySetupRulemakeInclude(java.lang.String patternA, java.lang.String patternB)Make an include rule for the patternsstatic ProximitySetupRulemakeInclude(StringPair patterns)Make an include rule for the patternsbooleanmatch(java.lang.String str1, java.lang.String str2)Check whether str1 and str2 matches the pattern.
Success is defined if the first pattern matches str1 and the second
matches str2 or the first matches str2 and the second str1.booleanmatch(StringPair pair)Check whether pair matches the patterns.
Success is defined if the first pattern matches pair.first and the second
matches pair.second or the first matches pair.second and the second pair.first.booleanmatchOne(java.lang.String name)Check whether name matches one of the patternsbooleanmatchPatternA(java.lang.String str)Check whether str matches pattern AbooleanmatchPatternB(java.lang.String str)Check whether name matches pattern Bjava.lang.StringtoString()ProximitySetupRule.RuleTypetype() 
 - 
 
- 
- 
Constructor Detail
- 
ProximitySetupRule
public ProximitySetupRule(long cPtr, boolean cMemoryOwn) 
- 
ProximitySetupRule
public ProximitySetupRule()
Constuct empty rule 
- 
ProximitySetupRule
public ProximitySetupRule(java.lang.String patternA, java.lang.String patternB, ProximitySetupRule.RuleType type)Constructs rule with patternA and patternB and type
- Parameters:
 patternA- [in] Pattern identifying first frame in rulepatternB- [in] Pattern identifying second frame in ruletype- documentation missing !
 
 - 
 
- 
Method Detail
- 
getCPtr
public static long getCPtr(ProximitySetupRule obj)
 
- 
delete
public void delete()
 
- 
type
public ProximitySetupRule.RuleType type()
 
- 
getPatterns
public StringPair getPatterns()
Returns the string patterns used to match 
- 
match
public boolean match(java.lang.String str1, java.lang.String str2)Check whether str1 and str2 matches the pattern.
Success is defined if the first pattern matches str1 and the second
matches str2 or the first matches str2 and the second str1. 
- 
match
public boolean match(StringPair pair)
Check whether pair matches the patterns.
Success is defined if the first pattern matches pair.first and the second
matches pair.second or the first matches pair.second and the second pair.first. 
- 
matchOne
public boolean matchOne(java.lang.String name)
Check whether name matches one of the patterns 
- 
matchPatternA
public boolean matchPatternA(java.lang.String str)
Check whether str matches pattern A 
- 
matchPatternB
public boolean matchPatternB(java.lang.String str)
Check whether name matches pattern B 
- 
equals
public boolean equals(ProximitySetupRule p)
Compares if two rules are the same 
- 
makeExclude
public static ProximitySetupRule makeExclude(StringPair patterns)
Make an exclude rule for the patterns 
- 
makeExclude
public static ProximitySetupRule makeExclude(java.lang.String patternA, java.lang.String patternB)
Make an exclude rule for the patterns 
- 
makeInclude
public static ProximitySetupRule makeInclude(StringPair patterns)
Make an include rule for the patterns 
- 
makeInclude
public static ProximitySetupRule makeInclude(java.lang.String patternA, java.lang.String patternB)
Make an include rule for the patterns 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -