Skip to content

Tag Archives: Guava-Functions

Longs.max() is a method of Longs Class in Guava library which is used to find the greatest value present in an array. The value returned… Read More
Doubles.min() is a method of Doubles Class in Guava library which is used to find the least value present in an array. The value returned… Read More
Floats.min() is a method of Floats Class in Guava library which is used to find the least value present in an array. The value returned… Read More
Booleans.indexOf(boolean[] array, boolean[] target) method of Guava’s Booleans Class accepts two parameters array and target. If the target exists within the array, the method returns… Read More
Chars.min() is a method of Chars Class in Guava library which is used to find the least value present in an array. The value returned… Read More
Longs.min() is a method of Longs Class in Guava library which is used to find the least value present in an array. The value returned… Read More
The method omitEmptyStrings() returns a splitter that behaves equivalently to this splitter, but automatically omits empty strings from the results. For example, Splitter.on (‘, ‘).omitEmptyStrings().split(“,… Read More
The method trimResults() returns a splitter that behaves equivalently to this splitter, but automatically removes leading and trailing whitespace from each returned substring. For example,… Read More
The method fixedLength(int length) returns a splitter that divides strings into pieces of the given length. For example, Splitter.fixedLength(2).split(“abcde”) returns an iterable containing [“ab”, “cd”,… Read More
The method splitToList(CharSequence sequence) splits sequence into string components and returns them as an immutable list. Syntax: public List<String> splitToList(CharSequence sequence) Parameters: This method takes… Read More
The method limit(int limit) returns a splitter that behaves equivalently to this splitter but stops splitting after it reaches the limit. The limit defines the… Read More