Package org.robwork.sdurw_proximity
Class ProximitySetupRule
- java.lang.Object
-
- org.robwork.sdurw_proximity.ProximitySetupRule
-
public class ProximitySetupRule extends java.lang.Object
Rule 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 class
ProximitySetupRule.RuleType
Include and Exclude identifiers
-
Constructor Summary
Constructors Constructor Description ProximitySetupRule()
Constructs empty exclude rule (only for SWIG internal use).ProximitySetupRule(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 void
delete()
boolean
equals(ProximitySetupRule p)
Compares if two rules are the samestatic long
getCPtr(ProximitySetupRule obj)
Pair_s_s
getPatterns()
Returns the string patterns used to matchstatic ProximitySetupRule
makeExclude(java.lang.String patternA, java.lang.String patternB)
Make an exclude rule for the patternsstatic ProximitySetupRule
makeExclude(Pair_s_s patterns)
Make an exclude rule for the patternsstatic ProximitySetupRule
makeInclude(java.lang.String patternA, java.lang.String patternB)
Make an include rule for the patternsstatic ProximitySetupRule
makeInclude(Pair_s_s patterns)
Make an include rule for the patternsboolean
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.boolean
match(Pair_s_s 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.boolean
matchOne(java.lang.String name)
Check whether name matches one of the patternsboolean
matchPatternA(java.lang.String str)
Check whether str matches pattern Aboolean
matchPatternB(java.lang.String str)
Check whether name matches pattern Bjava.lang.String
toString()
ProximitySetupRule.RuleType
type()
Returns the type of rule
-
-
-
Constructor Detail
-
ProximitySetupRule
public ProximitySetupRule(long cPtr, boolean cMemoryOwn)
-
ProximitySetupRule
public ProximitySetupRule()
Constructs empty exclude rule (only for SWIG internal use).
-
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()
-
getPatterns
public Pair_s_s getPatterns()
Returns the string patterns used to match
-
type
public ProximitySetupRule.RuleType type()
Returns the type of rule
-
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(Pair_s_s 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(ProximitySetupRule p)
Compares if two rules are the same
-
makeExclude
public static ProximitySetupRule makeExclude(Pair_s_s 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(Pair_s_s 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
-
-