info.aduna.gee.publication.session
Class OpaqueRule

java.lang.Object
  extended by info.aduna.gee.publication.session.OpaqueRule
Direct Known Subclasses:
OpaqueAndRule, OpaqueOrRule

public class OpaqueRule
extends Object

This is again a class of immutables!


Field Summary
protected static Hashtable _internedOpaqueRules
           
protected  String _rule
           
static OpaqueRule NONE
           
 
Method Summary
protected static boolean _evaluate(String rule, OpaqueCLabel[] labels)
           
protected static int _findClose(String rule, int index)
          Find the closing ) in rule for the ( at index.
static boolean charIsRuleChar(char ch)
          Check whether a character is a rule character (contrary to a label character).
static OpaqueRule create(String rule)
           
 boolean evaluate(OpaqueCLabel[] labels)
           
static boolean isRule(String fragment)
          Check whether a string is a rule.
 String toString()
          Get the String representation of the rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static OpaqueRule NONE

_rule

protected String _rule

_internedOpaqueRules

protected static Hashtable _internedOpaqueRules
Method Detail

toString

public String toString()
Get the String representation of the rule.

Overrides:
toString in class Object

evaluate

public boolean evaluate(OpaqueCLabel[] labels)

_evaluate

protected static boolean _evaluate(String rule,
                                   OpaqueCLabel[] labels)

_findClose

protected static int _findClose(String rule,
                                int index)
Find the closing ) in rule for the ( at index.


create

public static OpaqueRule create(String rule)
Parameters:
rule - the original rule string

isRule

public static boolean isRule(String fragment)
Check whether a string is a rule.

Returns:
true if a real rule, false if it is a simple numeric clabel identifier

charIsRuleChar

public static boolean charIsRuleChar(char ch)
Check whether a character is a rule character (contrary to a label character).



Copyright © 1997-2008 Aduna. All Rights Reserved.