Package com.ibm.icu.util

Examples of com.ibm.icu.util.CaseInsensitiveString


   * Remove a source-target/variant from the specDAG.
   */
  private void removeSTV(final String source, final String target, final String variant) {
    // assert(source.length() > 0);
    // assert(target.length() > 0);
    CaseInsensitiveString cisrc = new CaseInsensitiveString(source);
    CaseInsensitiveString citrg = new CaseInsensitiveString(target);
    CaseInsensitiveString civar = new CaseInsensitiveString(variant);
    Map<CaseInsensitiveString, List<CaseInsensitiveString>> targets = specDAG.get(cisrc);
    if (targets == null) {
      return; // should never happen for valid s-t/v
    }
    List<CaseInsensitiveString> variants = targets.get(citrg);
View Full Code Here


    ///CLOVER:OFF
    if (DEBUG) {
      System.out.println("TransliteratorRegistry.findInDynamicStore:" + ID);
    }
    ///CLOVER:ON
    return registry.get(new CaseInsensitiveString(ID));
  }
View Full Code Here

    if (stv[2] != null && stv[2].length() > 0) {
      ID = ID + '/' + stv[2];
    }

    // Use the registered display name, if any
    String n = displayNameCache.get(new CaseInsensitiveString(ID));
    if (n != null) {
      return n;
    }

    // Use display name for the entire transliterator, if it
View Full Code Here

   * @stable ICU 2.0
   */
  public static void registerClass(final String ID, final Class<? extends Transliterator> transClass, final String displayName) {
    registry.put(ID, transClass, true);
    if (displayName != null) {
      displayNameCache.put(new CaseInsensitiveString(ID), displayName);
    }
  }
View Full Code Here

   *            the ID of the transliterator or class
   * @see #registerClass
   * @stable ICU 2.0
   */
  public static void unregister(final String ID) {
    displayNameCache.remove(new CaseInsensitiveString(ID));
    registry.remove(ID);
  }
View Full Code Here

     * as well, that is, Any-inverseTarget.getInverse() => Any-target
     */
    public static void registerSpecialInverse(String target,
                                              String inverseTarget,
                                              boolean bidirectional) {
        SPECIAL_INVERSES.put(new CaseInsensitiveString(target), inverseTarget);
        if (bidirectional && !target.equalsIgnoreCase(inverseTarget)) {
            SPECIAL_INVERSES.put(new CaseInsensitiveString(inverseTarget), target);
        }
    }
View Full Code Here

    private static SingleID specsToSpecialInverse(Specs specs) {
        if (!specs.source.equalsIgnoreCase(ANY)) {
            return null;
        }
        String inverseTarget = (String) SPECIAL_INVERSES.get(
            new CaseInsensitiveString(specs.target));
        if (inverseTarget != null) {
            // If the original ID contained "Any-" then make the
            // special inverse "Any-Foo"; otherwise make it "Foo".
            // So "Any-NFC" => "Any-NFD" but "NFC" => "NFD".
            StringBuffer buf = new StringBuffer();
View Full Code Here

        if (stv[2] != null && stv[2].length() > 0) {
            ID = ID + '/' + stv[2];
        }

        // Use the registered display name, if any
        String n = (String) displayNameCache.get(new CaseInsensitiveString(ID));
        if (n != null) {
            return n;
        }

        // Use display name for the entire transliterator, if it
View Full Code Here

     * @stable ICU 2.0
     */
    public static void registerClass(String ID, Class transClass, String displayName) {
        registry.put(ID, transClass, true);
        if (displayName != null) {
            displayNameCache.put(new CaseInsensitiveString(ID), displayName);
        }
    }
View Full Code Here

     * @param ID the ID of the transliterator or class
     * @see #registerClass
     * @stable ICU 2.0
     */
    public static void unregister(String ID) {
        displayNameCache.remove(new CaseInsensitiveString(ID));
        registry.remove(ID);
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.util.CaseInsensitiveString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.