Java – Locale.LanguageRange Class

Java Locale.LanguageRange Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.

Variables in Java Locale.LanguageRange Class

S.No Variable & Description
1 static double MAX_WEIGHT

A constant holding the maximum value of weight, 1.0, which indicates that the language range is a good fit for the user.
2 static double MIN_WEIGHT

A constant holding the minimum value of weight, 0.0, which indicates that the language range is not a good fit for the user.

Constructors in Java Locale.LanguageRange Class

S.No Constructor & Description
1 LanguageRange(String range)

Constructs a LanguageRange using the given range.
2 LanguageRange(String range, double weight)

Constructs a LanguageRange using the given range and weight.

Methods in Java Locale.LanguageRange Class

S.No Method & Description
1 boolean equals(Object obj)

Compares this object to the specified object.
2 String getRange()

Returns the language range of this LanguageRange.
3 double getWeight()

Returns the weight of this LanguageRange.
4 int hashCode()

Returns a hash code value for the object.
5 static List<Locale.LanguageRange> mapEquivalents(List<Locale.LanguageRange> priorityList, Map<String,List<String>> map)

Generates a new customized Language Priority List using the given priorityList and map.
6 static List<Locale.LanguageRange> parse(String ranges)

Parses the given ranges to generate a Language Priority List.
7 static List<Locale.LanguageRange> parse(String ranges, Map<String,List<String>> map)

Parses the given ranges to generate a Language Priority List, and then customizes the list using the given map.

Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java ArrayList lastIndexOf() method with example
  2. Java ArrayList listIterator() method with example
  3. Java – OptionalLong Class
  4. Java – GregorianCalendar Class
  5. Java LinkedHashSet spliterator() method with example
  6. Java – StampedLock Class
  7. Java – LinkedHashMap Class
  8. Java – ObjLongConsumer Interface
  9. Java – Dictionary Class
  10. Java ArrayList sort() method with example
  11. Java – Set Interface
  12. Java – ReentrantReadWriteLock.WriteLock Class
  13. Java – DoubleConsumer Interface
  14. Java – Readable Interface
  15. Java – CopyOnWriteArraySet Class

Be the first to comment

Leave a Reply