Package com.google.mu.util
package com.google.mu.util
StringFormat, Substring, Optionals and more...
Package Specification
The code is developed and tested under Java 8.0.-
ClassDescriptionBiOptional<A,
B> An optional pair of values; either the pair is present with both values, or is absent with no value.Both<A,B> Represents two unrelated or loosely-related things of typeAandB.Utility tobreakinput strings (normally identifier strings) incamelCase,UpperCamelCase,snake_case,UPPER_SNAKE_CASEanddash-caseetc.A predicate of character.Utilities pertaining toOptional.This class provides type-safe transition between 1-based Ordinal and 0-based indexes that are commonly used to index arrays and lists.Result of a previously evaluated condition.A string parser to extract placeholder values from input strings according to a format string.A functional SPI interface for custom interpolation.A template that will produce instances of typeT, after filling the template placeholders with the given variadic parameters.Utilities for creating patterns that attempt to match a substring in an input string.The style of the bounds of a match.The result of successfully matching aSubstring.Patternagainst a string, providing access to thematched substring, to the parts of the stringbeforeandafterit, and to copies with the matched substringremovedorreplaced.A pattern that can be matched against a string, finding a single substring from it.An immutable string prefixPatternwith extra utilities such asSubstring.Prefix.addToIfAbsent(String),Substring.Prefix.removeFrom(StringBuilder),Substring.Prefix.isIn(CharSequence)etc.A substring pattern to be applied repeatedly on the input string, each time over the remaining substring after the previous match.An immutable string suffixPatternwith extra utilities such asSubstring.Suffix.addToIfAbsent(String),Substring.Suffix.removeFrom(StringBuilder),Substring.Suffix.isIn(CharSequence)etc.