congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FactoryRegistry.setOrdering
Code IndexAdd Tabnine to your IDE (free)

How to use
setOrdering
method
in
org.geotools.factory.FactoryRegistry

Best Java code snippets using org.geotools.factory.FactoryRegistry.setOrdering (Showing top 6 results out of 315)

origin: org.geotools/gt2-metadata

  set |= setOrdering(category, f1, f2);
} else if (c < 0) {
  set |= setOrdering(category, f2, f1);
origin: org.geotools/gt-metadata

  set |= setOrdering(category, f1, f2);
} else if (c < 0) {
  set |= setOrdering(category, f2, f1);
origin: org.geotools/gt-metadata

  /**
   * Helper method for the above.
   */
  private <T> boolean setOrUnsetOrdering(final Class<T> category, final boolean set,
                      final Filter service1, final Filter service2)
  {
    boolean done = false;
    T impl1 = null;
    T impl2 = null;
    for (final Iterator<? extends T> it=getServiceProviders(category, false); it.hasNext();) {
      final T factory = it.next();
      if (service1.filter(factory)) impl1 = factory;
      if (service2.filter(factory)) impl2 = factory;
      if (impl1!=null && impl2!=null && impl1!=impl2) {
        if (set) done |=   setOrdering(category, impl1, impl2);
        else     done |= unsetOrdering(category, impl1, impl2);
      }
    }
    return done;
  }
}
origin: org.geotools/gt2-metadata

if (service2.filter(factory)) impl2 = factory;
if (impl1!=null && impl2!=null && impl1!=impl2) {
  if (set) done |=   setOrdering(category, impl1, impl2);
  else     done |= unsetOrdering(category, impl1, impl2);
origin: org.geotools/gt-metadata

final T other = it.next();
if (other != factory) {
  setOrdering(category, factory, other);
origin: org.geotools/gt2-metadata

final Object other = it.next();
if (other != factory) {
  setOrdering(category, factory, other);
org.geotools.factoryFactoryRegistrysetOrdering

Javadoc

Set pairwise ordering between all factories according a comparator. Calls to Comparator#compare(factory1, factory2) should returns:
  • -1 if factory1 is preferred to factory2
  • +1 if factory2 is preferred to factory1
  • 0 if there is no preferred order between factory1 and factory2

Popular methods of FactoryRegistry

  • getServiceProviders
  • scanForPlugins
    Scans for factory plug-ins of the given category, with guard against recursivities. The recursivity
  • getServiceProvider
    Returns the first provider in the registry for the specified category, using the specified map of hi
  • lookupProviders
  • registerServiceProvider
  • <init>
    Constructs a new registry for the specified categories.
  • debug
    Log a debug message for #getServiceProvider method. Note: we are not required to insert the method n
  • getCachedProviders
    Returns the providers available in the cache, or null if none. To be overridden by FactoryCreator on
  • getCategories
  • getClassLoaders
    Returns all class loaders to be used for scanning plugins. Current implementation returns the follow
  • getFactories
  • getLogHeader
    Prepares a message to be logged if any provider has been registered.
  • getFactories,
  • getLogHeader,
  • getServiceImplementation,
  • getServiceProviderByClass,
  • getUnfilteredProviders,
  • isAcceptable,
  • isAvailable,
  • loadingFailure,
  • log,
  • register

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now