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

io.apicurio.datamodels.models.union.UnionValueImpl Maven / Gradle / Ivy

The newest version!
package io.apicurio.datamodels.models.union;

import io.apicurio.datamodels.models.visitors.Visitor;

/**
 * Base class for all union value implementations.
 * 
 * @author [email protected]
 */
public abstract class UnionValueImpl implements UnionValue, Union {

	private T value;

	public UnionValueImpl() {
	}

	public UnionValueImpl(T value) {
		this.value = value;
	}

	@Override
	public Object unionValue() {
		return value;
	}

	@Override
	public T getValue() {
		return value;
	}

	@Override
	public void setValue(T value) {
		this.value = value;
	}

	@Override
	public boolean isList() {
		return false;
	}

	@Override
	public boolean isMap() {
		return false;
	}

	@Override
	public boolean isEntity() {
		return false;
	}

	@Override
	public boolean isEntityList() {
		return false;
	}

	@Override
	public boolean isEntityMap() {
		return false;
	}

	@Override
	public void accept(Visitor visitor) {
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy