Alignments
Class Ambiguous

java.lang.Object
  extended by Alignments.Ambiguous
All Implemented Interfaces:
java.io.Serializable

public class Ambiguous
extends java.lang.Object
implements java.io.Serializable

Stores details of ambiguous characters

Version:
1.0
See Also:
Serialized Form

Constructor Summary
Ambiguous()
          Default constructor for use when there are no ambiguous characters
Ambiguous(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> ambig)
          Constructor for use when there are ambiguous characters
 
Method Summary
static Ambiguous fromFile(java.io.File f)
          Reads in amiguous data information from a file.
 java.util.Set<java.lang.String> getPossible(java.lang.String c)
          Gets the characters an ambiguous charcter could represent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ambiguous

public Ambiguous()
Default constructor for use when there are no ambiguous characters


Ambiguous

public Ambiguous(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> ambig)
Constructor for use when there are ambiguous characters

Parameters:
ambig - A map from the ambiguous characters to the set of characters the ambiguous charcater could represent. Recurssive definitions are not allowed.
Method Detail

getPossible

public java.util.Set<java.lang.String> getPossible(java.lang.String c)
Gets the characters an ambiguous charcter could represent

Parameters:
c - The ambiguous character
Returns:
The set of charcaters that could be represented by it

fromFile

public static Ambiguous fromFile(java.io.File f)
                          throws InputException
Reads in amiguous data information from a file. File should be a tab delimited file with one ambiguous character per line. The first field on each line is the ambiguous character while also subsquent field represents a character that could be represented by it

Parameters:
f - File object for the input file
Returns:
An Ambiguous object
Throws:
InputException