package indexableIndex;

public class IndexableString implements Indexable <String>{
	private String myString;
	
	IndexableString (String str) {
		if (str == null)
			myString = new String ();
		else
			myString = str;
	}
	
	public int length () {
		return myString.length();
	}
	
	public String get (int i) throws IndexOutOfBoundsException {
		if (i < length()  && i >= 0)
			return "" + myString.charAt(i);
		else 
			throw new IndexOutOfBoundsException();
	}
	
}
