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

com.github.jnthnclt.os.lab.collections.baph.BAPHEqualer Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
package com.github.jnthnclt.os.lab.collections.baph;

/**
 *
 * @author jonathan.colt
 */
public class BAPHEqualer {

    public static final BAPHEqualer SINGLETON = new BAPHEqualer();

    public boolean equals(byte[] a, byte[] b, int bOffset, int bLength) {
        if (a == b) {
            return true;
        }
        if (a == null || b == null) {
            return false;
        }

        if (a.length != bLength) {
            return false;
        }

        for (int i = 0; i < bLength; i++) {
            if (a[i] != b[i + bOffset]) {
                return false;
            }
        }
        return true;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy