congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IConstant.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
jscl.math.function.IConstant

Best Java code snippets using jscl.math.function.IConstant.getName (Showing top 7 results out of 315)

origin: org.solovyev/jscl

@Nonnull
public static String toString(@Nonnull IConstant constant) {
  final Double doubleValue = constant.getDoubleValue();
  if (doubleValue == null) {
    final String stringValue = constant.getValue();
    if (!Strings.isEmpty(stringValue)) {
      return constant.getName() + " = " + stringValue;
    } else {
      return constant.getName();
    }
  } else {
    return constant.getName() + " = " + doubleValue;
  }
}
origin: org.solovyev/jscl

  @Override
  public boolean apply(@Nullable IConstant constant) {
    if (constant != null) {
      if (localValue.equals(constant.getDoubleValue())) {
        if (!constant.getName().equals(Constants.PI_INV.getName())) {
          if (!constant.getName().equals(Constants.PI.getName()) || JsclMathEngine.getInstance().getAngleUnits() == AngleUnit.rad) {
            return true;
          }
        }
      }
    }
    return false;
  }
});
origin: org.solovyev.android/calculatorpp-core

public void copy(@Nonnull MathEntity o) {
  if (o instanceof IConstant) {
    final IConstant that = ((IConstant) o);
    this.name = that.getName();
    this.value = that.getValue();
    this.description = that.getDescription();
    this.system = that.isSystem();
    if (that.isIdDefined()) {
      this.id = that.getId();
    }
  } else {
    throw new IllegalArgumentException("Trying to make a copy of unsupported type: " + o.getClass());
  }
}
origin: org.solovyev.android/calculatorpp-core

public Builder(@Nonnull IConstant iConstant) {
  this.name = iConstant.getName();
  this.value = iConstant.getValue();
  this.system = iConstant.isSystem();
  this.description = iConstant.getDescription();
  if (iConstant.isIdDefined()) {
    this.id = iConstant.getId();
  }
}
origin: org.solovyev/jscl

return constant.getName();
origin: org.solovyev/jscl

public NumericWrapper(@Nonnull Constant constant) {
  final IConstant constantFromRegistry = JsclMathEngine.getInstance().getConstantsRegistry().get(constant.getName());
  if (constantFromRegistry != null) {
    if (constantFromRegistry.getName().equals(Constants.I.getName())) {
      content = Complex.I;
    } else {
      if (constantFromRegistry.getValue() != null) {
        final Double value = constantFromRegistry.getDoubleValue();
        if (value == null) {
          throw new ArithmeticException("Constant " + constant.getName() + " has invalid definition: " + constantFromRegistry.getValue());
        } else {
          content = Real.valueOf(value);
        }
      } else {
        throw new ArithmeticException("Could not create numeric wrapper: constant in registry doesn't have specified value: " + constant.getName());
      }
    }
  } else {
    throw new ArithmeticException("Could not create numeric wrapper: constant is not registered in constants registry: " + constant.getName());
  }
}
origin: org.solovyev.android/calculatorpp-core

if (!newConstant.getName().equals(CalculatorVarsRegistry.ANS)) {
  evaluate();
Locator.getInstance().getKeyboard().buttonPressed(constant.getName());
break;
jscl.math.functionIConstantgetName

Popular methods of IConstant

  • getDescription
  • getDoubleValue
  • getValue
  • getId
  • isDefined
  • isIdDefined
  • isSystem
  • toJava

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
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