public class CodonSet{
	String code;	
	public CodonSet(String c){
		code = c;
	}
	public String ComplimentTo(String type) throws NotABaseException{
		int i;
		char c;
		char n;
		StringBuffer comp = new StringBuffer(code.length());		
		for (i=0; i < code.length();i++){
			c = code.charAt(i);
			switch (c){
				case 'A':
				case 'a':
					if (type == "DNA"){
						comp.append('T');
					}else{
						comp.append('U');
					}
					break;
				case 'U':
				case 'u':
					comp.append('A');
				break;
				
				case 'T':
				case 't':
					comp.append('A');
					break;
				case 'C':
				case 'c':
					comp.append('G');
					break;
				case 'G':
				case 'g':
					comp.append('C');
					break;
				default: throw new NotABaseException(c);
			}//close switch				
		}//close for
		return comp.toString();
	}//close method
}
