com.atlassian.jira.plugin.util.orderings
Class ByOriginModuleDescriptorOrdering

java.lang.Object
  extended by com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor>
      extended by com.atlassian.jira.plugin.util.orderings.ByOriginModuleDescriptorOrdering
All Implemented Interfaces:
Comparator<com.atlassian.plugin.ModuleDescriptor>

public class ByOriginModuleDescriptorOrdering
extends com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor>

Orders module descriptors according to the "origin" of the plugin they come from. The origin of a plugin can be one of "user installed" or "system" as determined by the plugin metadata manager.

Module descriptors coming from user plugins are considered to be "greater than" the ones coming from system plugins.

Since:
v4.4
See Also:
PluginMetadataManager

Method Summary
 int compare(com.atlassian.plugin.ModuleDescriptor o1, com.atlassian.plugin.ModuleDescriptor o2)
           
 
Methods inherited from class com.google.common.collect.Ordering
arbitrary, binarySearch, compound, compound, explicit, explicit, from, from, greatestOf, immutableSortedCopy, isOrdered, isStrictlyOrdered, leastOf, lexicographical, max, max, max, max, min, min, min, min, natural, nullsFirst, nullsLast, onResultOf, reverse, sortedCopy, usingToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

compare

public int compare(com.atlassian.plugin.ModuleDescriptor o1,
                   com.atlassian.plugin.ModuleDescriptor o2)
Specified by:
compare in interface Comparator<com.atlassian.plugin.ModuleDescriptor>
Specified by:
compare in class com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor>


Copyright © 2002-2014 Atlassian. All Rights Reserved.