Lines Matching refs:weight

53  * weight, and then by input order. That is, if two languages have the same weight, the first one in the original order
81 * Add a language code to the list being built, with weight 1.0.
91 * Add a language code to the list being built, with specified weight.
94 * @param weight value from 0.0 to 1.0
97 public static Builder add(ULocale languageCode, final double weight) {
98 return new Builder().add(languageCode, weight);
123 * Return the weight for a given language, or null if there is none. Note that
126 * @param language to get weight of
127 * @return weight
144 double weight = languagesAndWeights.get(language);
145 if (weight != D1) {
146 result.append(";q=").append(weight);
232 Double weight = languageToWeight.get(lang);
233 Set<ULocale> s = doubleCheck.get(weight);
235 doubleCheck.put(weight, s = new LinkedHashSet<ULocale>());
239 // We now have a bunch of items sorted by weight, then chronologically.
243 final Double weight = langEntry.getKey();
245 temp.put(lang, preserveWeights ? weight : D1);
267 * Adds a new language code, with weight = 1.0.
269 * @param languageCode to add with weight 1.0
277 * Adds language codes, with each having weight = 1.0.
290 * Adds a new supported languageCode, with specified weight. Overrides any
291 * previous weight for the language.
294 * @param weight value between 0.0 and 1.1
298 double weight) {
302 if (weight <= D0) {
304 } else if (weight > D1) {
305 weight = D1;
307 languageToWeight.put(languageCode, weight);
323 final double weight = Double.parseDouble(itemMatcher.group(2));
324 if (!(weight >= D0 && weight <= D1)) { // do ! for NaN
325 throw new IllegalArgumentException("Illegal weight, must be 0..1: "
326 + weight);
328 add(language, weight);