Commit 6157ce78 authored by Michael Lee's avatar Michael Lee
Browse files

Backport changes to String types

parent 405d4200
......@@ -5,7 +5,7 @@ import cse332.interfaces.worklists.FixedSizeFIFOWorkList;
public class AlphabeticString extends BString<Character> {
public AlphabeticString(String s) {
super(wrap(s.toCharArray()));
super(BString.wrap(s.toCharArray()));
}
public AlphabeticString(FixedSizeFIFOWorkList<Character> q) {
......
......@@ -12,7 +12,9 @@ public class BitString extends BString<Boolean> {
super(s);
}
public static Class<Boolean> getLetterType() { return Boolean.class; }
public static Class<Boolean> getLetterType() {
return Boolean.class;
}
public short get() {
short result = 0;
......
......@@ -8,11 +8,11 @@ import cse332.interfaces.worklists.FixedSizeFIFOWorkList;
public class ByteString extends BString<Byte> {
public ByteString(String s) {
super(wrap(s.getBytes()));
super(BString.wrap(s.getBytes()));
}
public ByteString(byte[] s) {
super(wrap(s));
super(BString.wrap(s));
}
public ByteString(FixedSizeFIFOWorkList<Byte> q) {
......@@ -23,8 +23,9 @@ public class ByteString extends BString<Byte> {
super(s);
}
public static Class<Byte> getLetterType() { return Byte.class; }
public static Class<Byte> getLetterType() {
return Byte.class;
}
public String toString() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment