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

com.ly.invoker.builder.compiler.Element Maven / Gradle / Ivy

package com.ly.invoker.builder.compiler;

import com.ly.invoker.builder.constant.ChainType;

public class Element {
    private ChainType type;
    private Object value;
    private boolean empty = false;

    private Element(ChainType type, Object value, boolean empty) {
        this.type = type;
        this.value = value;
        this.empty = empty;
    }

    public static Element of(ChainType type, Object value) {
        return new Element(type, value, false);
    }

    public static Element empty(ChainType type) {
        return new Element(type, null, true);
    }

    public ChainType getType() {
        return type;
    }

    public Object getValue() {
        return value;
    }

    public boolean isEmpty() {
        return empty;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy