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

com.contentgrid.thunx.predicates.model.Scalar Maven / Gradle / Ivy

Go to download

Set of (vendor-neutral) data structures to model authorization policy expressions

There is a newer version: 0.11.0
Show newest version
package com.contentgrid.thunx.predicates.model;

import java.math.BigDecimal;

public interface Scalar extends ThunkExpression {

    T getValue();

    default  R accept(ThunkExpressionVisitor visitor, C context) {
        return visitor.visit(this, context);
    }

    static NumberValue of(BigDecimal number) {
        return new NumberValue(number);
    }

    static NumberValue of(double number) {
        return of(BigDecimal.valueOf(number));
    }

    static NumberValue of(long number) {
        return of(BigDecimal.valueOf(number));
    }

    static StringValue of(String value) {
        return new StringValue(value);
    }

    static BooleanValue of(boolean value) {
        return new BooleanValue(value);
    }

    static NullValue nullValue() {
        return NullValue.INSTANCE;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy