org.apache.jsieve.comparators
Class AsciiNumeric

java.lang.Object
  extended by org.apache.jsieve.comparators.AsciiNumeric
All Implemented Interfaces:
Comparator, Contains, Equals, Matches

public class AsciiNumeric
extends java.lang.Object
implements Comparator

Class AsciiNumeric implements the EQUALITY operation of the i;ascii-numeric comparator as defined by RFC2244, section 3.4.


Constructor Summary
AsciiNumeric()
          Constructor for AsciiNumeric.
 
Method Summary
protected  java.lang.String computeCompareString(java.lang.String string)
          Method getCompareString answers a String in which all non-digit characters are translated to the character 0xff.
 boolean contains(java.lang.String container, java.lang.String content)
          Unsupported, see RFC4790.
 boolean equals(java.lang.String string1, java.lang.String string2)
          Method equals answers a boolean indicating if parameter string1 is equal to parameter string2 using the comparison rules defind by the implementation.
 boolean matches(java.lang.String string, java.lang.String glob)
          Unsupported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsciiNumeric

public AsciiNumeric()
Constructor for AsciiNumeric.

Method Detail

equals

public boolean equals(java.lang.String string1,
                      java.lang.String string2)
Description copied from interface: Equals
Method equals answers a boolean indicating if parameter string1 is equal to parameter string2 using the comparison rules defind by the implementation.

Specified by:
equals in interface Equals
Returns:
boolean
See Also:
Equals.equals(String, String)

computeCompareString

protected java.lang.String computeCompareString(java.lang.String string)
Method getCompareString answers a String in which all non-digit characters are translated to the character 0xff.

Parameters:
string -
Returns:
String

contains

public boolean contains(java.lang.String container,
                        java.lang.String content)
                 throws FeatureException
Unsupported, see RFC4790.

Specified by:
contains in interface Contains
Returns:
boolean
Throws:
FeatureException - when substring is unsupported
See Also:
Contains.contains(String, String)

matches

public boolean matches(java.lang.String string,
                       java.lang.String glob)
                throws FeatureException
Unsupported operation. RFC5228 limits support to comparators that support :contains. RFC4790 states that substring matches are not supported.

Specified by:
matches in interface Matches
Returns:
boolean
Throws:
FeatureException
See Also:
Matches.matches(String, String)


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.