public final class TextUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
formatApproaches(java.lang.String[] approaches)
Converts String array with approaches values
to a string ready for API consumption.
|
static java.lang.String |
formatBearing(java.util.List<java.lang.Double[]> bearings)
Formats the bearing variables from the raw values to a string which can than be used for the
request URL.
|
static java.lang.String |
formatCoordinate(double coordinate)
Useful to remove any trailing zeros and prevent a coordinate being over 7 significant figures.
|
static java.lang.String |
formatCoordinate(double coordinate,
int precision)
Allows the specific adjusting of a coordinates precision.
|
static java.lang.String |
formatDistributions(java.util.List<java.lang.Integer[]> distributions)
converts the list of integer arrays to a string ready for API consumption.
|
static java.lang.String |
formatRadiuses(double[] radiuses)
Used in various APIs to format the user provided radiuses to a String matching the APIs format.
|
static java.lang.String |
formatWaypointNames(java.lang.String[] waypointNames)
Converts String array with waypoint_names values
to a string ready for API consumption.
|
static boolean |
isEmpty(java.lang.CharSequence str)
Returns true if the string is null or 0-length.
|
static java.lang.String |
join(java.lang.CharSequence delimiter,
java.lang.Object[] tokens)
Returns a string containing the tokens joined by delimiters.
|
public static boolean isEmpty(java.lang.CharSequence str)
str - the string to be examinedpublic static java.lang.String join(java.lang.CharSequence delimiter,
java.lang.Object[] tokens)
delimiter - the delimeter on which to split.tokens - An array objects to be joined. Strings will be formed from the objects by
calling object.toString().Stringpublic static java.lang.String formatCoordinate(double coordinate)
coordinate - a double value representing a coordinate.public static java.lang.String formatCoordinate(double coordinate,
int precision)
coordinate - a double value representing a coordinate.precision - an integer value you'd like the precision to be at.public static java.lang.String formatRadiuses(double[] radiuses)
radiuses - a double array which represents the radius valuespublic static java.lang.String formatBearing(java.util.List<java.lang.Double[]> bearings)
bearings - a List of doubles representing bearing valuespublic static java.lang.String formatDistributions(java.util.List<java.lang.Integer[]> distributions)
distributions - the list of integer arrays representing the distributionpublic static java.lang.String formatApproaches(java.lang.String[] approaches)
approaches - a string representing approaches to each coordinate.public static java.lang.String formatWaypointNames(java.lang.String[] waypointNames)
waypointNames - a string representing approaches to each coordinate.