JDK 11 jdk.jcmd.jmod - JCmd Tool

JDK 11 jdk.jcmd.jmod is the JMOD file for JDK 11 JCmd tool, which can be invoked by the "jcmd" command.

JDK 11 JCmd tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jcmd.jmod.

JDK 11 JCmd tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 JCmd source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jcmd.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

sun/tools/jstat/Operator.java

/*
 * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package sun.tools.jstat;

import java.util.*;


/**
 * A typesafe enumeration for describing mathematical operators.
 *
 * @author Brian Doherty
 * @since 1.5
 */
public abstract class Operator {

    private static int nextOrdinal = 0;
    private static HashMap<String, Operator> map = new HashMap<String, Operator>();

    private final String name;
    private final int ordinal = nextOrdinal++;

    private Operator(String name) {
        this.name = name;
        map.put(name, this);
    }

    protected abstract double eval(double x, double y);

    /* Operator '+' */
    public static final Operator PLUS = new Operator("+") {
        protected double eval(double x, double y) {
            return x + y;
        }
    };

    /* Operator '-' */
    public static final Operator MINUS = new Operator("-") {
        protected double eval(double x, double y) {
            return x - y;
        }
    };

    /* Operator '/' */
    public static final Operator DIVIDE = new Operator("/") {
        protected double eval(double x, double y) {
            if (y == 0) {
                return Double.NaN;
            }
            return x / y;
        }
    };

    /* Operator '*' */
    public static final Operator MULTIPLY = new Operator("*") {
        protected double eval(double x, double y) {
            return x * y;
        }
    };

    /**
     * Returns the string representation of this Operator object.
     *
     * @return  the string representation of this Operator object
     */
    public String toString() {
        return name;
    }

    /**
     * Maps a string to its corresponding Operator object.
     *
     * @param   s  an string to match against Operator objects.
     * @return     The Operator object matching the given string.
     */
    public static Operator toOperator(String s) {
        return map.get(s);
    }

    /**
     * Returns an enumeration of the keys for this enumerated type
     *
     * @param   s  an string to match against Operator objects.
     * @return     The Operator object matching the given string.
     */
    protected static Set<?> keySet() {
        return map.keySet();
    }
}

sun/tools/jstat/Operator.java

 

Or download all of them as a single archive file:

File name: jdk.jcmd-11.0.1-src.zip
File size: 47892 bytes
Release date: 2018-11-04
Download 

 

JDK 11 jdk.jconsole.jmod - JConsole Tool

JDK 11 jdk.javadoc.jmod - Java Document Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-07-07, 13850👍, 0💬