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

org.nd4j.linalg.primitives.AtomicBoolean Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.primitives;

public class AtomicBoolean extends java.util.concurrent.atomic.AtomicBoolean {

    public AtomicBoolean(boolean initialValue){
        super(initialValue);
    }

    public AtomicBoolean(){
        this(false);
    }

    @Override
    public boolean equals(Object o){
        if(o instanceof AtomicBoolean){
            return get() == ((AtomicBoolean)o).get();
        } else if(o instanceof Boolean){
            return get() == ((Boolean)o);
        }
        return false;
    }

    @Override
    public int hashCode(){
        return get() ? 1 : 0;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy