JDK 11 jdk.hotspot.agent.jmod - Hotspot Agent Module

JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module.

JDK 11 Hotspot Agent module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.hotspot.agent.jmod.

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

JDK 11 Hotspot Agent module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.hotspot.agent.

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

✍: FYIcenter

sun/jvm/hotspot/ui/table/TableModelComparator.java

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

package sun.jvm.hotspot.ui.table;

import java.util.*;

import javax.swing.table.TableModel;
import javax.swing.event.TableModelEvent;

/**
 * A comparator which compares rows in a table model
 */
public abstract class TableModelComparator implements Comparator {

    private boolean ascending;
    protected TableModel model;

    private int[] columns;

    public TableModelComparator(TableModel model) {
        this.model = model;

        // XXX - Should actually listen for column changes and resize
        columns = new int[model.getColumnCount()];
        columns[0] = -1;
    }

    /**
     * Add the column to the sort criteria
     */
    public void addColumn(int column) {
        // Shift columns in the array
        int[] tempArray = new int[model.getColumnCount()];
        System.arraycopy(columns, 1, tempArray, 0, columns.length - 1);

        columns = tempArray;
        columns[0] = column;
    }

    /**
     * Get the last column that was sorted
     */
    public int getColumn() {
        return columns[0];
    }

    public void setAscending(boolean ascending) {
        this.ascending = ascending;
    }

    public boolean isAscending() {
        return ascending;
    }

    /**
     * Implementation of the comparator method. A comparison is
     * made for rows.
     */
    public int compare(Object row1, Object row2) {
        for (int i = 0; i < columns.length; i++) {

            Object o1 = getValueForColumn(row1, columns[i]);
            Object o2 = getValueForColumn(row2, columns[i]);

            // If both values are null, return 0.
            if (o1 == null && o2 == null) {
                return 0;
            } else if (o1 == null) { // Define null less than everything.
                return -1;
            } else if (o2 == null) {
                return 1;
            }

            int result = 0;

            if (o1 instanceof Comparable) {
                Comparable c1 = (Comparable)o1;
                Comparable c2 = (Comparable)o2;

                result = c1.compareTo(c2);
            }

            // XXX Should have some sort of provision for determininte
            // if there is another way of comparing the objects.
            // Perhaps we should add the requirement that all table
            // values be Compabable.

            if (result != 0) {
                return ascending ? result : -result;
            }
        }
        return 0;
    }

    /**
     * Returns the value for the comparing object for the
     * column.
     *
     * @param obj Row object that was passed into Comparator.
     * @param column the column to retrieve
     */
    public abstract Object getValueForColumn(Object obj, int column);

}

sun/jvm/hotspot/ui/table/TableModelComparator.java

 

Or download all of them as a single archive file:

File name: jdk.hotspot.agent-11.0.1-src.zip
File size: 1243786 bytes
Release date: 2018-11-04
Download 

 

JDK 11 jdk.httpserver.jmod - HTTP Server Module

JDK 11 jdk.editpad.jmod - Edit Pad Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-02-29, 131452👍, 0💬