package ubf;

public class UBFBinary extends UBFObject
{
    public byte value[];
    public int size;

    public UBFBinary(String s) {
	value = s.getBytes();
	size = value.length;
    }

    public UBFBinary(byte []bytes, int len) {
	value = new byte[len];
	value = bytes;
	size = len;
    }

    public boolean isBinary() {
	return true;
    }

    public String toString() {
	return new String(value);
    }

    public int size() {
	return size;
    }

    /**
     * O(1) when argument is an atom, normal string comparison when
     * its a string
     */
    public boolean equals(Object o) {
	return ((o instanceof UBFBinary) && ((UBFBinary)o).value == value)
	    || ((o instanceof String) && o.equals(value));
    }

    public int hashCode() {
	return value.hashCode();
    }
}


@@ -455,112 +455,8 @@
  %7D%0A%0A
-    /**%0A     * O(1) when argument is an atom, normal string comparison when%0A     * its a string%0A     */%0A
     
@@ -604,15 +604,27 @@
 als(
+new String(
 value))
+)
 ;%0A  

Fix UBFBinary.equals when comparing String