All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.purej.vminspect.data.MBeanNameComparator Maven / Gradle / Ivy

Go to download

An easy to use, feature-rich, JMX-based and embeddable Java VM monitoring tool with a web-based user-interface

There is a newer version: 2.1.1
Show newest version
// Copyright (c), 2013, adopus consulting GmbH Switzerland, all rights reserved.
package com.purej.vminspect.data;

import java.util.Comparator;
import com.purej.vminspect.util.Utils;

/**
 * Comparator to sort {@link MBeanName} objects based on name.
 *
 * @author Stefan Mueller
 */
public final class MBeanNameComparator implements Comparator {
  @Override
  public int compare(MBeanName o1, MBeanName o2) {
    int result = Utils.compareTo(o1.getDomain(), o2.getDomain());
    return result == 0 ? Utils.compareTo(o1.getType(), o2.getType()) : result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy