Lines Matching refs:weight

52  * weight, and then by input order. That is, if two languages have the same weight, the first one in the original order
80 * 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
98 public static Builder add(ULocale languageCode, final double weight) {
99 return new Builder().add(languageCode, weight);
126 * Return the weight for a given language, or null if there is none. Note that
129 * @param language to get weight of
130 * @return weight
149 double weight = languagesAndWeights.get(language);
150 if (weight != D1) {
151 result.append(";q=").append(weight);
243 Double weight = languageToWeight.get(lang);
244 Set<ULocale> s = doubleCheck.get(weight);
246 doubleCheck.put(weight, s = new LinkedHashSet<ULocale>());
250 // We now have a bunch of items sorted by weight, then chronologically.
254 final Double weight = langEntry.getKey();
256 temp.put(lang, preserveWeights ? weight : D1);
279 * Adds a new language code, with weight = 1.0.
281 * @param languageCode to add with weight 1.0
290 * Adds language codes, with each having weight = 1.0.
304 * Adds a new supported languageCode, with specified weight. Overrides any
305 * previous weight for the language.
308 * @param weight value between 0.0 and 1.1
313 double weight) {
317 if (weight <= D0) {
319 } else if (weight > D1) {
320 weight = D1;
322 languageToWeight.put(languageCode, weight);
339 final double weight = Double.parseDouble(itemMatcher.group(2));
340 if (!(weight >= D0 && weight <= D1)) { // do ! for NaN
341 throw new IllegalArgumentException("Illegal weight, must be 0..1: "
342 + weight);
344 add(language, weight);