org.apache.jsieve.comparators
Class Octet

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

public class Octet
extends java.lang.Object
implements Comparator

Class Octet implements the EQUALITY operation of the i;octet comparator as defined by RFC2244, section 3.4 - "For the equality function, two strings are equal if they are the same length and contain the same octets in the same order. NIL is equal only to itself".


Constructor Summary
Octet()
          Constructor for Octet.
 
Method Summary
 boolean contains(java.lang.String container, java.lang.String content)
          Method contains answers a boolean indicating if parameter container contains parameter content using the comparison rules defind by the implementation.
 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)
          Method matches answers a boolean indicating if parameter string1 matches the pattern in parameter glob using the matching rules defind by the implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Octet

public Octet()
Constructor for Octet.

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)

contains

public boolean contains(java.lang.String container,
                        java.lang.String content)
Description copied from interface: Contains
Method contains answers a boolean indicating if parameter container contains parameter content using the comparison rules defind by the implementation.

Specified by:
contains in interface Contains
Returns:
boolean
See Also:
Contains.contains(String, String)

matches

public boolean matches(java.lang.String string,
                       java.lang.String glob)
                throws SievePatternException
Description copied from interface: Matches
Method matches answers a boolean indicating if parameter string1 matches the pattern in parameter glob using the matching rules defind by the implementation.

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


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