public class Utility extends Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static String |
collapse(String source)
Method to remove extra spaces from the string specified by the string attributes.
|
static String |
filterString(String value) |
static String |
getDateTime()
Get the current date time.
|
static boolean |
isNull(String value)
Determines whether a value is null as defined by the PDS.
|
static String |
itrim(String source)
Replace multiple whitespaces between words with single blank
|
static String |
ltrim(String source)
Trim the string of any spaces on the left end (ie., leading spaces removed)
Remove leading spaces for each line when there is multiple lines of string
|
static String |
printDiff(String indent,
List<DiffRecord> records) |
static List<String> |
removeQuotes(List<String> list) |
static String |
replaceChars(String strToReplace) |
static String |
rtrim(String source)
Trim the string of any spaces on the right end (ie., trailing spaces removed)
|
static String |
stripNewLines(String value) |
static String |
stripOnlyWhitespaceAndNewLine(String value)
Strips only newline characters and extra whitespaces.
|
static String |
stripWhitespace(String value) |
static URL |
toURL(String s)
Convert a string to a URL.
|
static String |
trimString(String value,
int length) |
static boolean |
valueExists(String value,
List<String> lists) |
public static String stripOnlyWhitespaceAndNewLine(String value)
value
- A string value.public static String collapse(String source)
public static String itrim(String source)
public static String ltrim(String source)
public static String rtrim(String source)
public static boolean isNull(String value)
value
- The value in questionpublic static URL toURL(String s) throws MalformedURLException
s
- The string to convertMalformedURLException
public static String getDateTime()
public static String printDiff(String indent, List<DiffRecord> records)
Copyright © 2010–2016 Planetary Data System. All rights reserved.