All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javajs.util.BArray Maven / Gradle / Ivy

There is a newer version: 14.31.10
Show newest version
package javajs.util;

public class BArray {
  public byte[] data;
  
  public BArray(byte[] data) {
    this.data = data;
  }

  @Override
  public boolean equals(Object o) {
    if (o instanceof BArray) {
      byte[] d = ((BArray) o).data;
      if (d.length == data.length){
        for (int i = 0; i < d.length; i++)
          if (d[i] != data[i])
            return false;
        return true;
      }
    }
    return false;
  }

  @Override
  public int hashCode() {
    return data.hashCode();
  }
  
  @Override
  public String toString() {
    return new String(data);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy