Package org.openwms.common.comm
Class ParserUtils
java.lang.Object
org.openwms.common.comm.ParserUtils
A ParserUtils.
- Author:
- Heiko Scherrer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringnullableBarcode(String barcode) Return the standard telegram representation (???..)static StringnullableLocation(String locationId) Return the standard telegram representation (***..) if thelocationIdis null.static StringnullableLocationGroup(String locationGroup) Return the standard telegram representation (***..) if thelocationGroupis null.static StringPad a Stringswith a numbernof characterschr.static StringPad the given Stringswith a numbernof characterschr.static StringTrim the given StringĀsabout the characterchr.
-
Constructor Details
-
ParserUtils
private ParserUtils()
-
-
Method Details
-
padRight
Pad the given Stringswith a numbernof characterschr.- Parameters:
s- The String to padn- Number of digits in sumchr- The actual padding character- Returns:
- A new padded String instance
-
trimRight
Trim the given StringĀsabout the characterchr.- Parameters:
s- The String to analysechr- The character to remove from the right end sid- Returns:
- A new trimmed String instance
-
padLeft
Pad a Stringswith a numbernof characterschr.- Parameters:
s- The String to padn- Number of digits in sumchr- The actual padding character- Returns:
- A new padded String instance
-
nullableBarcode
Return the standard telegram representation (???..) if thebarcodeis null.- Parameters:
barcode- The Barcode to translate- Returns:
- The barcode or ????????????????????
-
nullableLocation
Return the standard telegram representation (***..) if thelocationIdis null.- Parameters:
locationId- The LocationId to translate- Returns:
- The normalized LocationId or ********************
-
nullableLocationGroup
Return the standard telegram representation (***..) if thelocationGroupis null.- Parameters:
locationGroup- The name of the LocationGroup to analyse- Returns:
- The normalized name or ********************
-