Guava’s Splitter Class provides various methods to handle splitting operations on string, objects, etc. It extracts non-overlapping substrings from an input string, typically by recognizing appearances of a separator sequence. This separator can be specified as a single character, fixed string, regular expression or CharMatcher instance.
Declaration: Following is the declaration for com.google.common.base.Splitter class:
@GwtCompatible(emulated = true) public final class Splitter extends Object
The following table gives a brief summary about the methods of Guava’s Splitter class:
[GeeksforGeeks, is, the, best, website, to, prepare, for, interviews]
Some other methods provided by the Splitter class are:
Hello GFG What's up ?
Reference: Google Guava
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- Splitter omitEmptyStrings() method | Guava | Java
- Splitter trimResults() method | Guava | Java
- Splitter splitToList() method | Guava | Java
- Splitter limit() method | Guava | Java
- Splitter fixedLength() method | Guava | Java
- Splitter withKeyValueSeparator(char separator) method | Guava | Java
- Range Class | Guava | Java
- Ordering Class | Guava | Java
- BigIntegerMath Class | Guava | Java
- Java Guava | mean() method of IntMath Class
- Optional Class | Guava | Java
- IntMath Class | Guava | Java
- LongMath Class | Guava | Java
- Ints Class | Guava | Java
- Chars Class | Guava | Java
- Longs Class | Guava | Java
- Bytes Class | Guava | Java
- Shorts Class | Guava | Java
- Doubles Class | Guava | Java
- Booleans Class | Guava | Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.