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

org.scassandra.cql.CqlBoolean Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package org.scassandra.cql;

public class CqlBoolean extends PrimitiveType {
    CqlBoolean() {
        super("boolean");
    }
    @Override
    public boolean equals(Object expected, Object actual) {
        if (expected == null) throw throwNullError(actual, this);

        Boolean actualTyped;
        if (actual instanceof Boolean) {
            actualTyped = (Boolean) actual;
        } else {
            actualTyped = Boolean.parseBoolean(actual.toString());
        }

        if (expected instanceof Boolean) {
            return expected.equals(actualTyped);
        } else {
            throw throwInvalidType(expected, actual, this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy