3966N/A * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 2712N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2712N/A * This code is free software; you can redistribute it and/or modify it 2712N/A * under the terms of the GNU General Public License version 2 only, as 2712N/A * published by the Free Software Foundation. Oracle designates this 2712N/A * particular file as subject to the "Classpath" exception as provided 2712N/A * by Oracle in the LICENSE file that accompanied this code. 2712N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2712N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2712N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2712N/A * version 2 for more details (a copy is included in the LICENSE file that 2712N/A * You should have received a copy of the GNU General Public License version 2712N/A * 2 along with this work; if not, write to the Free Software Foundation, 2712N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2712N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2712N/A * or visit www.oracle.com if you need additional information or have any 2712N/A ******************************************************************************* 2712N/A * Copyright (C) 2009-2010, International Business Machines Corporation and * 2712N/A * others. All Rights Reserved. * 2712N/A ******************************************************************************* 2712N/A // normalize separators to "_" 2712N/A // Use case insensitive string to prevent duplication 2712N/A // null type is used for remove the key 2712N/A // normalize separator to "-" 2712N/A // clear entire Unicode locale extension 2712N/A // Make a list of extension subtags 2712N/A * Set a list of BCP47 extensions and private use subtags 2712N/A * BCP47 extensions are already validated and well-formed, but may contain duplicates 2712N/A // each extension string contains singleton, e.g. "a-abc-def" 2712N/A // privateuse string contains prefix, e.g. "x-abc-def" 2712N/A * Reset Builder's internal state with the given language tag 2712N/A // Special backward compatibility support 2712N/A // When locale ja_JP_JP is created, ca-japanese is always there. 2712N/A // The builder ignores the variant "JP" 2712N/A // When locale th_TH_TH is created, nu-thai is always there. 2712N/A // The builder ignores the variant "TH" 2712N/A // no_NO_NY is a valid locale and used by Java 6 or older versions. 2712N/A // The build ignores the variant "NY" and change the language to "nn". 2712N/A // Validate base locale fields before updating internal state. 2712N/A // so no checks are necessary. 2712N/A // The input locale is validated at this point. 2712N/A // Now, updating builder's internal fields. 3966N/A // map localeExtensions back to builder's internal format 2712N/A // Special private use subtag sequence identified by "lvariant" will be 2712N/A // interpreted as Java variant. 2712N/A * Remove special private use subtag sequence identified by "lvariant" 2712N/A * and return the rest. Only used by LocaleExtensions 2712N/A // Note: privateuse value "abc-lvariant" is unchanged 2712N/A // because no subtags after "lvariant". 2712N/A // Note: privateuse value "abc-lvariant" is unchanged 2712N/A // because no subtags after "lvariant". 2712N/A * Check if the given variant subtags separated by the given 2712N/A * Private methods parsing Unicode Locale Extension subtags. 2712N/A * The input must be a valid extension subtags (excluding singleton). 2712N/A // next keyword - emit previous one 2712N/A // 2. next keyword, but previous one was duplicate 3966N/A * Constructs a CaseInsensitiveChar with the first char of the