Tabnine Logo
ValueOption.copyFrom
Code IndexAdd Tabnine to your IDE (free)

How to use
copyFrom
method
in
com.asakusafw.runtime.value.ValueOption

Best Java code snippets using com.asakusafw.runtime.value.ValueOption.copyFrom (Showing top 5 results out of 315)

origin: asakusafw/asakusafw

@SuppressWarnings("deprecation")
static <V extends ValueOption<V>> V update(V property, V newValue) {
  property.copyFrom(newValue);
  return property;
}
origin: asakusafw/asakusafw

@SuppressWarnings("deprecation")
@Override
public E set(int index, E element) {
  if (index < 0 || index >= size()) {
    throw new IndexOutOfBoundsException();
  }
  E result = get(index);
  result.copyFrom(element);
  return result;
}
origin: asakusafw/asakusafw

@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
@Override
public final Object copyObject(Object o) {
  ValueOption<?> object = (ValueOption<?>) o;
  if (object == null || object.isNull()) {
    return null;
  }
  ValueOption copy = newObject();
  copy.copyFrom(object);
  return copy;
}
origin: asakusafw/asakusafw

/**
 * Sets the specified value to this object only if the specified value is less than this object. However, if either
 * this object or the specified value represents {@code null}, this object will also turn to {@code null}.
 * @param other the target value
 */
public final void min(V other) {
  if (this == other) {
    return;
  }
  if (this.isNull() || other.isNull()) {
    setNull();
  } else if (compareTo(other) > 0) {
    copyFrom(other);
  }
}
origin: asakusafw/asakusafw

  /**
   * Sets the specified value to this object only if the specified value is greater than this object. However, if
   * either this object or the specified value represents {@code null}, this object will also turn to {@code null}.
   * @param other the target value
   */
  public final void max(V other) {
    if (this == other) {
      return;
    }
    if (this.isNull() || other.isNull()) {
      setNull();
    } else if (compareTo(other) < 0) {
      copyFrom(other);
    }
  }
}
com.asakusafw.runtime.valueValueOptioncopyFrom

Javadoc

Copies the value from the specified values into this.

Popular methods of ValueOption

  • isNull
    Returns whether this object represents null or not.
  • setNull
    Makes this value represent null.
  • compareTo

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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