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

io.vtom.vertx.pipeline.value.PipeValue Maven / Gradle / Ivy

There is a newer version: 1.1-beta
Show newest version
package io.vtom.vertx.pipeline.value;

import io.enoa.toolkit.convert.IConverter;
import io.enoa.toolkit.value.EnoaValue;

public class PipeValue {

  public static final PipeValue NULL = new PipeValue(null);

  private EnoaValue value;


  protected PipeValue(Object value) {
    this.value = EnoaValue.with(value);
  }

  public static PipeValue with(Object value) {
    if (value == null)
      return NULL;
    return new PipeValue(value);
  }

  public Object get() {
    return this.origin();
  }

  public Object origin() {
    return value.origin();
  }

  public  T as(T def) {
    return this.value.as(def);
  }

  public  T as() {
    return this.value.as();
  }

  public boolean isNull() {
    return this.value.isNull();
  }

  public  R to(IConverter converter) {
    return this.value.to(converter);
  }

  public EnoaValue value() {
    return this.value;
  }

  @Override
  public String toString() {
    return this.value.toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy