congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
com.oath.cyclops.util.box
Code IndexAdd Tabnine to your IDE (free)

How to use com.oath.cyclops.util.box

Best Java code snippets using com.oath.cyclops.util.box (Showing top 20 results out of 315)

origin: aol/cyclops

/**
 * @param varFn New value
 * @return  this object with mutated value
 */
public MutableByte mutate(final ByteFunction varFn) {
  return set(varFn.apply(getAsByte()));
}
origin: aol/cyclops

/**
 * @param varFn New value
 * @return  this object with mutated value
 */
public MutableShort mutate(final ShortFunction varFn) {
  return set(varFn.apply(get()));
}
origin: aol/cyclops

/**
 * @param varFn New value
 * @return  this object with mutated value
 */
public MutableBoolean mutate(final BooleanFunction varFn) {
  return set(varFn.apply(getAsBoolean()));
}
origin: aol/cyclops

/**
 * @param varFn New value
 * @return  this object with mutated value
 */
public MutableChar mutate(final CharFunction varFn) {
  return set(varFn.apply(get()));
}
origin: aol/cyclops

/**
 * @param value Create an initialised ImmutableClosedValue with specified value
 * @return Initialised ImmutableClosedValue
 */
public static <T> LazyImmutable<T> of(final T value) {
  final LazyImmutable<T> v = new LazyImmutable<>();
  v.setOnce(value);
  return v;
}
origin: aol/cyclops

/**
 * Get the current value or set if it has not been set yet
 *
 * @param lazy Supplier to generate new value
 * @return Current value
 */
public T computeIfAbsent(final Supplier<T> lazy) {
  final T val = get();
  if (val == UNSET)
    return setOnceFromSupplier(lazy);
  return val;
}
origin: aol/cyclops

public <T1> Mutable<T1> mapInput(final Function<T1, T> fn) {
  final Mutable<T> host = this;
  return new Mutable<T1>() {
    @Override
    public Mutable<T1> set(final T1 value) {
      host.set(fn.apply(value));
      return this;
    }
  };
}
origin: aol/cyclops

/**
 * Create an intermediate unbound (or unitialised) ImmutableClosedValue)
 *
 * @return unitialised ImmutableClosedValue
 */
public static <T> LazyImmutable<T> unbound() {
  return new LazyImmutable<>();
}
origin: aol/cyclops

  @Override
  public void accept(final int value) {
    set(value);

  }
}
origin: aol/cyclops

  @Override
  public void accept(final long value) {
    set(value);

  }
}
origin: aol/cyclops

@Override
public Long get() {
  return getAsLong();
}
origin: aol/cyclops

@Override
public void accept(final T t) {
  set(t);
}
origin: aol/cyclops

@Override
public void accept(final Float t) {
  set(t);
}
origin: aol/cyclops

@Override
public Character get() {
  return getAsChar();
}
origin: aol/cyclops

@Override
public Byte get() {
  return getAsByte();
}
origin: aol/cyclops

/**
 * @param varFn New value
 * @return  this object with mutated value
 */
public MutableFloat mutate(final FloatFunction varFn) {
  var = varFn.apply(var);
  return this;
}
origin: aol/cyclops

@Override
public Short get() {
  return getAsShort();
}
origin: aol/cyclops

@Override
public Boolean get() {
  return getAsBoolean();
}
origin: aol/cyclops

public <R> Mutable<R> mapOutput(final Function<T, R> fn) {
  final Mutable<T> host = this;
  return new Mutable<R>() {
    @Override
    public R get() {
      return fn.apply(host.get());
    }
  };
}
origin: aol/cyclops

/**
 * @return a defined, but unitialised LazyImmutable
 */
public static <T> LazyImmutable<T> def() {
  return new LazyImmutable<>();
}
com.oath.cyclops.util.box

Most used classes

  • LazyImmutable
    A class that represents an 'immutable' value that is generated inside a lambda expression, but is ac
  • Mutable
    Class that represents a Closed Variable In Java 8 because of the effectively final rule references t
  • MutableBoolean
    Class that represents a Closed Variable In Java 8 because of the effectively final rule references t
  • MutableByte
    Class that represents a Closed Variable In Java 8 because of the effectively final rule references t
  • MutableChar
    Class that represents a Closed Variable In Java 8 because of the effectively final rule references t
  • MutableFloat,
  • MutableInt,
  • MutableLong,
  • MutableShort,
  • MutableBoolean$1,
  • MutableBoolean$BooleanFunction,
  • MutableByte$1,
  • MutableByte$ByteFunction,
  • MutableChar$1,
  • MutableChar$CharFunction,
  • MutableDouble$1,
  • MutableFloat$1,
  • MutableFloat$FloatFunction,
  • MutableInt$1
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now