Tabnine Logo
PojoQuery.toComparable
Code IndexAdd Tabnine to your IDE (free)

How to use
toComparable
method
in
org.apache.juneau.utils.PojoQuery

Best Java code snippets using org.apache.juneau.utils.PojoQuery.toComparable (Showing top 3 results out of 315)

origin: org.apache.juneau/juneau-marshall

  @Override /* Comparator */
  public int compare(Map m1, Map m2) {
    Comparable v1 = toComparable(m1.get(c)), v2 = toComparable(m2.get(c));
    if (v1 == null && v2 == null)
      return 0;
    if (v1 == null)
      return (isDesc ? -1 : 1);
    if (v2 == null)
      return (isDesc ? 1 : -1);
    return (isDesc ? v2.compareTo(v1) : v1.compareTo(v2));
  }
};
origin: apache/juneau

  @Override /* Comparator */
  public int compare(Map m1, Map m2) {
    Comparable v1 = toComparable(m1.get(c)), v2 = toComparable(m2.get(c));
    if (v1 == null && v2 == null)
      return 0;
    if (v1 == null)
      return (isDesc ? -1 : 1);
    if (v2 == null)
      return (isDesc ? 1 : -1);
    return (isDesc ? v2.compareTo(v1) : v1.compareTo(v2));
  }
};
origin: apache/juneau

  @Override /* Comparator */
  public int compare(Map m1, Map m2) {
    Comparable v1 = toComparable(m1.get(c)), v2 = toComparable(m2.get(c));
    if (v1 == null && v2 == null)
      return 0;
    if (v1 == null)
      return (isDesc ? -1 : 1);
    if (v2 == null)
      return (isDesc ? 1 : -1);
    return (isDesc ? v2.compareTo(v1) : v1.compareTo(v2));
  }
};
org.apache.juneau.utilsPojoQuerytoComparable

Popular methods of PojoQuery

  • <init>
    Constructor.
  • filter
    Filters the input object as a collection of maps.
  • doSort
  • doView
  • getPrecisionField
  • parseDate
    Parses a timestamp string off the beginning of the string segment 'seg'. Goes through each possible
  • replace
    Replaces tokens in a string with a different token. replace("A and B and C", "and", "or") -> "A or B
  • replaceWithMutables
  • splitQuoted
  • unEscapeChars
    Removes escape characters (specified by escapeChar) from the specified characters.
  • filterCollection
  • filterMap
  • filterCollection,
  • filterMap

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JComboBox (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best IntelliJ 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