Java 类sun.misc.ASCIICaseInsensitiveComparator 实例源码

项目:OpenJSharp    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:OpenJSharp    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:jdk8u-jdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:jdk8u-jdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:Java8CN    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:Java8CN    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:jdk8u_jdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:jdk8u_jdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:lookaside_java-1.8.0-openjdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:VarJ    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
        * @return true if this attribute name is equal to the
        *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
    Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
    return c.compare(name, ((Name)o).name) == 0;
    } else {
    return false;
    }
}
项目:VarJ    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
       public int hashCode() {
    if (hashCode == -1) {
    hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:jdk-1.7-annotated    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:jdk-1.7-annotated    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:infobip-open-jdk-8    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:infobip-open-jdk-8    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:jdk8u-dev-jdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:jdk8u-dev-jdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:jdk7-jdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:jdk7-jdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:openjdk-source-code-learn    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:openjdk-source-code-learn    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:OLD-OpenJDK8    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator<String> c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:OLD-OpenJDK8    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:openjdk-jdk7u-jdk    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:openjdk-jdk7u-jdk    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:openjdk-icedtea7    文件:Attributes.java   
/**
 * Compares this attribute name to another for equality.
 * @param o the object to compare
 * @return true if this attribute name is equal to the
 *         specified attribute object
 */
public boolean equals(Object o) {
    if (o instanceof Name) {
        Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER;
        return c.compare(name, ((Name)o).name) == 0;
    } else {
        return false;
    }
}
项目:openjdk-icedtea7    文件:Attributes.java   
/**
 * Computes the hash value for this attribute name.
 */
public int hashCode() {
    if (hashCode == -1) {
        hashCode = ASCIICaseInsensitiveComparator.lowerCaseHashCode(name);
    }
    return hashCode;
}
项目:OpenJSharp    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:jdk8u-jdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:Java8CN    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:jdk8u_jdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:lookaside_java-1.8.0-openjdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:jdk-1.7-annotated    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator i = providers(); i.hasNext();) {
                    CharsetProvider cp = (CharsetProvider)i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:infobip-open-jdk-8    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:jdk8u-dev-jdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:jdk7-jdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                for (Iterator i = providers(); i.hasNext();) {
                    CharsetProvider cp = (CharsetProvider)i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:openjdk-source-code-learn    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                for (Iterator i = providers(); i.hasNext();) {
                    CharsetProvider cp = (CharsetProvider)i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:OLD-OpenJDK8    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator<CharsetProvider> i = providers(); i.hasNext();) {
                    CharsetProvider cp = i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}
项目:openjdk-jdk7u-jdk    文件:Charset.java   
/**
 * Constructs a sorted map from canonical charset names to charset objects.
 *
 * <p> The map returned by this method will have one entry for each charset
 * for which support is available in the current Java virtual machine.  If
 * two or more supported charsets have the same canonical name then the
 * resulting map will contain just one of them; which one it will contain
 * is not specified. </p>
 *
 * <p> The invocation of this method, and the subsequent use of the
 * resulting map, may cause time-consuming disk or network I/O operations
 * to occur.  This method is provided for applications that need to
 * enumerate all of the available charsets, for example to allow user
 * charset selection.  This method is not used by the {@link #forName
 * forName} method, which instead employs an efficient incremental lookup
 * algorithm.
 *
 * <p> This method may return different results at different times if new
 * charset providers are dynamically made available to the current Java
 * virtual machine.  In the absence of such changes, the charsets returned
 * by this method are exactly those that can be retrieved via the {@link
 * #forName forName} method.  </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names
 *         to charset objects
 */
public static SortedMap<String,Charset> availableCharsets() {
    return AccessController.doPrivileged(
        new PrivilegedAction<SortedMap<String,Charset>>() {
            public SortedMap<String,Charset> run() {
                TreeMap<String,Charset> m =
                    new TreeMap<String,Charset>(
                        ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                put(standardProvider.charsets(), m);
                CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
                if (ecp != null)
                    put(ecp.charsets(), m);
                for (Iterator i = providers(); i.hasNext();) {
                    CharsetProvider cp = (CharsetProvider)i.next();
                    put(cp.charsets(), m);
                }
                return Collections.unmodifiableSortedMap(m);
            }
        });
}