fr.umlv.tatoo.cc.lexer.charset
Class CharacterSet

java.lang.Object
  extended by fr.umlv.tatoo.cc.lexer.charset.CharacterSet

public class CharacterSet
extends Object

Author:
jcervell

Field Summary
static Comparator<CharacterInterval> LEXICO
           
 
Constructor Summary
CharacterSet(List<CharacterInterval> list)
           
CharacterSet(List<CharacterInterval> intervalList, boolean negate, Encoding encoding)
           
 
Method Summary
 boolean equals(Object obj)
           
 List<CharacterInterval> getList()
           
 int hashCode()
           
 Triplet split(CharacterSet secondSet)
          split(A,B) returns (A\B,A inter B,B\A) each is null if empty
 CharacterSet union(CharacterSet secondSet)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEXICO

public static final Comparator<CharacterInterval> LEXICO
Constructor Detail

CharacterSet

public CharacterSet(List<CharacterInterval> intervalList,
                    boolean negate,
                    Encoding encoding)

CharacterSet

public CharacterSet(List<CharacterInterval> list)
Parameters:
list - a list of sorted intervals which must not overlap
Method Detail

union

public CharacterSet union(CharacterSet secondSet)

split

public Triplet split(CharacterSet secondSet)
split(A,B) returns (A\B,A inter B,B\A) each is null if empty


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getList

public List<CharacterInterval> getList()