URITemplate.getCustomVariables
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.cxf.jaxrs.model.URITemplate.getCustomVariables(Showing top 4 results out of 315)

origin: org.apache.cxf/cxf-rt-frontend-jaxrs

public static int compareTemplates(URITemplate t1, URITemplate t2) {
  String l1 = t1.getLiteralChars();
  String l2 = t2.getLiteralChars();
  if (!l1.equals(l2)) {
    // descending order
    return l1.length() < l2.length() ? 1 : -1;
  }
  int g1 = t1.getVariables().size();
  int g2 = t2.getVariables().size();
  // descending order
  int result = g1 < g2 ? 1 : g1 > g2 ? -1 : 0;
  if (result == 0) {
    int gCustom1 = t1.getCustomVariables().size();
    int gCustom2 = t2.getCustomVariables().size();
    if (gCustom1 != gCustom2) {
      // descending order
      return gCustom1 < gCustom2 ? 1 : -1;
    }
  }
  if (result == 0) {
    result = t1.getPatternValue().compareTo(t2.getPatternValue());
  }
  return result;
}
origin: apache/cxf

public static int compareTemplates(URITemplate t1, URITemplate t2) {
  String l1 = t1.getLiteralChars();
  String l2 = t2.getLiteralChars();
  if (!l1.equals(l2)) {
    // descending order
    return l1.length() < l2.length() ? 1 : -1;
  }
  int g1 = t1.getVariables().size();
  int g2 = t2.getVariables().size();
  // descending order
  int result = g1 < g2 ? 1 : g1 > g2 ? -1 : 0;
  if (result == 0) {
    int gCustom1 = t1.getCustomVariables().size();
    int gCustom2 = t2.getCustomVariables().size();
    if (gCustom1 != gCustom2) {
      // descending order
      return gCustom1 < gCustom2 ? 1 : -1;
    }
  }
  if (result == 0) {
    result = t1.getPatternValue().compareTo(t2.getPatternValue());
  }
  return result;
}
origin: org.apache.cxf/cxf-bundle

public static int compareTemplates(URITemplate t1, URITemplate t2) {
  String l1 = t1.getLiteralChars();
  String l2 = t2.getLiteralChars();
  if (!l1.equals(l2)) {
    // descending order
    return l1.length() < l2.length() ? 1 : -1;
  }
  int g1 = t1.getVariables().size();
  int g2 = t2.getVariables().size();
  // descending order
  int result = g1 < g2 ? 1 : g1 > g2 ? -1 : 0;
  if (result == 0) {
    int gCustom1 = t1.getCustomVariables().size();
    int gCustom2 = t2.getCustomVariables().size();
    if (gCustom1 != gCustom2) {
      // descending order
      return gCustom1 < gCustom2 ? 1 : -1;
    }
  }
  if (result == 0) {
    result = t1.getPatternValue().compareTo(t2.getPatternValue());
  }
    
  return result;
}
origin: org.apache.cxf/cxf-bundle-minimal

public static int compareTemplates(URITemplate t1, URITemplate t2) {
  String l1 = t1.getLiteralChars();
  String l2 = t2.getLiteralChars();
  if (!l1.equals(l2)) {
    // descending order
    return l1.length() < l2.length() ? 1 : -1;
  }
  int g1 = t1.getVariables().size();
  int g2 = t2.getVariables().size();
  // descending order
  int result = g1 < g2 ? 1 : g1 > g2 ? -1 : 0;
  if (result == 0) {
    int gCustom1 = t1.getCustomVariables().size();
    int gCustom2 = t2.getCustomVariables().size();
    if (gCustom1 != gCustom2) {
      // descending order
      return gCustom1 < gCustom2 ? 1 : -1;
    }
  }
  if (result == 0) {
    result = t1.getPatternValue().compareTo(t2.getPatternValue());
  }
    
  return result;
}
org.apache.cxf.jaxrs.modelURITemplategetCustomVariables

Javadoc

List of variables with patterns (regexps). List is subset of elements from #getVariables().

Popular methods of URITemplate

  • <init>
  • getValue
  • match
  • getVariables
    List of all variables in order of appearance in template.
  • substitute
    Substitutes template variables with mapped values. Variables are mapped to values; if not all variab
  • compareTemplates
  • createTemplate
  • encodeLiteralCharacters
    Encoded literal characters surrounding template variables, ex. "a {id} b" will be encoded to "a%20{i
  • escapeCharacters
  • getLiteralChars
  • getPatternValue
  • isReservedCharacter
  • getPatternValue,
  • isReservedCharacter,
  • createExactTemplate,
  • expand,
  • toString,
  • toURI,
  • toURL

Popular classes and methods

  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • setContentView (Activity)
  • Container (java.awt)
  • Kernel (java.awt.image)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)