Examples of Constant


Examples of jmathexpr.Constant

     *
     * @param name the name of the constant
     * @return a new Constant instance
     */
    public static Constant constant(String name) {
        return new Constant(name, Reals.getInstance());
    }
View Full Code Here

Examples of jnr.constants.Constant

        }
    }

   
    private Constant getConstant(E e) {
        Constant c;
        if (cacheGuard != 0 && (c = cache[e.ordinal()]) != null) { // read volatile guard
            return c;
        }
        // fallthru to slow lookup+add
        return lookupAndCacheConstant(e);
View Full Code Here

Examples of lupos.rif.model.Constant

  public Object visit(final RIFDocument n, final IRuleNode argu) {
    final Document doc = new Document();
    doc.setParent(argu);

    final Constant baseNS = (Constant) n.f2.accept(this, doc);
    doc.setBaseNamespace(baseNS != null ? ((URILiteral) baseNS.getLiteral())
        .getString() : null);
    baseNamespace = doc.getBaseNamespace();

    for (final INode node : (List<INode>) n.f3.accept(this, doc)) {
      final String[] prefix = (String[]) node.accept(this, doc);
View Full Code Here

Examples of org.apache.bcel.classfile.Constant

                if (type.equals(Utility.signatureToString(sig, false))) {
                    ConstantValue cval = field.getConstantValue();
                    if (cval != null) {
                        int index = cval.getConstantValueIndex();
                        ConstantPool cp = m_curClass.getConstantPool();
                        Constant cnst = cp.getConstant(index);
                        if (cnst instanceof ConstantString) {
                            Object value = ((ConstantString)cnst).
                                getConstantValue(cp);
                            if (init.equals(value)) {
                                return new ClassItem(name,this, field);
View Full Code Here

Examples of org.apache.commons.math3.analysis.function.Constant

        final GaussIntegrator integrator
            = new GaussIntegrator(new Pair<double[], double[]>(points, weights));

        final double val = 123.456;
        final UnivariateFunction c = new Constant(val);

        final double s = integrator.integrate(c);
        Assert.assertEquals(points.length * val, s, 0d);
    }
View Full Code Here

Examples of org.apache.drill.common.logical.data.Constant

    @Test
    public void testConstant(){

        ObjectMapper map = DrillConfig.create().getMapper();
        Constant con;
        try{
            con = map.readValue( FileUtils.getResourceAsString("/constant.json"), Constant.class);
            if (con == null){
                System.out.println("constant is null");
            }
View Full Code Here

Examples of org.apache.etch.compiler.ast.Constant

      // it's a named thing, it is a constant and do the
      // types match?
     
      if (named.isConstant())
      {
        Constant c = (Constant) named;
       
        // it's a constant, do the types match?
       
        Named<?> ct = c.type().getNamed( msg.parent() );
        Named<?> paramType = param.type().getNamed( msg.parent() );
        if (ct == paramType)
          return;
       
        throw typeMismatch( param, arg, argNo );
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.Constant

  }

// TODO setting the constant value is a mess...
  public void setValue(int index) {
    ConstantPool cp = this.cp;
    Constant c = cp.getConstant(index);
    value = ((ConstantObject) c).getConstantValue(cp);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant

    }
  } else {
    boolean isStatic = this.codegenBinding.isStatic();
    this.receiver.generateCode(currentScope, codeStream, !isStatic);
    if (valueRequired) {
      Constant fieldConstant = this.codegenBinding.constant();
      if (fieldConstant == Constant.NotAConstant) {
        if (this.codegenBinding.declaringClass == null) { // array length
          codeStream.arraylength();
        } else {
          if (this.codegenBinding.canBeSeenBy(this.receiverType, this, currentScope)) {
View Full Code Here

Examples of org.checkerframework.dataflow.constantpropagation.Constant

   * Returns the value of the leaf of {@code exprPath}, if it is determined to be a constant
   * (always evaluates to the same numeric value), and null otherwise.
   * Note that returning null does not necessarily mean the expression is *not* a constant.
   */
  public static Number numberValue(TreePath exprPath, Context context) {
    Constant val = DataFlow.expressionDataflow(exprPath, context, CONSTANT_PROPAGATION);
    if (val == null || !val.isConstant()) {
      return null;
    }
    return val.getValue();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.