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 String
nullableBarcode
(String barcode) Return the standard telegram representation (???..)static String
nullableLocation
(String locationId) Return the standard telegram representation (***..) if thelocationId
is null.static String
nullableLocationGroup
(String locationGroup) Return the standard telegram representation (***..) if thelocationGroup
is null.static String
Pad a Strings
with a numbern
of characterschr
.static String
Pad the given Strings
with a numbern
of characterschr
.static String
Trim the given StringĀs
about the characterchr
.
-
Constructor Details
-
ParserUtils
private ParserUtils()
-
-
Method Details
-
padRight
Pad the given Strings
with a numbern
of 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Ās
about 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 Strings
with a numbern
of 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 thebarcode
is null.- Parameters:
barcode
- The Barcode to translate- Returns:
- The barcode or ????????????????????
-
nullableLocation
Return the standard telegram representation (***..) if thelocationId
is null.- Parameters:
locationId
- The LocationId to translate- Returns:
- The normalized LocationId or ********************
-
nullableLocationGroup
Return the standard telegram representation (***..) if thelocationGroup
is null.- Parameters:
locationGroup
- The name of the LocationGroup to analyse- Returns:
- The normalized name or ********************
-