com.vgrs.xcode.idna.contextualrule
Interface ContextualRule

All Known Implementing Classes:
AbstractAllCodePointsEvaluated, AbstractAllCodePointsNotEvaluated, AbstractArabicIndicDigitsCodePoints, AbstractContextualRule, AbstractJoinerCodePointRule, ArabicIndicDigitsRule, ExtendedArabicIndicDigitsRule, GreekLowerNumeralSignRule, HebrewPunctuationGereshRule, HebrewPunctuationGershayimRule, KatakanaMiddleDotRule, MiddleDotRule, ZeroWidthJoinerRule, ZeroWidthNonJoinerRule

public interface ContextualRule

Interface for implementing the contextual rules in IDNA2008 Tables document.

Version:
1.0 May 5, 2010
Author:
nchigurupati

Field Summary
static boolean ALL_CODE_POINTS_EVALUATED_FALSE
           
static boolean ALL_CODE_POINTS_EVALUATED_TRUE
          Booleans to specify if all code points in the rule have been evaluated.
 
Method Summary
 boolean allCodePointsEvaluated()
           
 void executeRule(int aCodePointIndex, int[] aCodePoints)
          Executes the rule as per the IDNA2008 specification's contextual rule requirements for this rule.
 java.lang.String getRuleName()
           
 boolean ruleAppliesToCodepoint(int aCodePoint)
          Checks if the specified code point satisfies the condition for executing the rule
 void setRuleName(java.lang.String aRuleName)
           
 

Field Detail

ALL_CODE_POINTS_EVALUATED_TRUE

static final boolean ALL_CODE_POINTS_EVALUATED_TRUE
Booleans to specify if all code points in the rule have been evaluated. This is false for most of the rules which evaluate one code point at a time. However, a few rules (eg: ArabicIndicDigitsRule, KatakanaMiddleDotRule, etc.) evaluate all the code points when executed. For these rules a value of true is returned.

See Also:
Constant Field Values

ALL_CODE_POINTS_EVALUATED_FALSE

static final boolean ALL_CODE_POINTS_EVALUATED_FALSE
See Also:
Constant Field Values
Method Detail

ruleAppliesToCodepoint

boolean ruleAppliesToCodepoint(int aCodePoint)
Checks if the specified code point satisfies the condition for executing the rule

Parameters:
aCodePoint -
Returns:
boolean indicating if the contextual rule needs to be executed

executeRule

void executeRule(int aCodePointIndex,
                 int[] aCodePoints)
                 throws XcodeException
Executes the rule as per the IDNA2008 specification's contextual rule requirements for this rule.

Parameters:
aCodePointIndex - the index of the code point that satisfied the condition of this rule
aCodePoints - the code points to be evaluated.
Throws:
XcodeException

getRuleName

java.lang.String getRuleName()
Returns:
the name of the rule specified in ContextualRule.properties

setRuleName

void setRuleName(java.lang.String aRuleName)
Parameters:
aRuleName - set the name of the rule as specified in ContextualRule.properties

allCodePointsEvaluated

boolean allCodePointsEvaluated()
Returns:
a boolean indicating if all code points have been evaluated. If all code points have been evaluated, this rule will not be executed again.


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved