Class ParserUtils

java.lang.Object
org.openwms.common.comm.ParserUtils

public final class ParserUtils extends Object
A ParserUtils.
Author:
Heiko Scherrer
  • Constructor Details

    • ParserUtils

      private ParserUtils()
  • Method Details

    • padRight

      public static String padRight(String s, int n, String chr)
      Pad the given String s with a number n of characters chr.
      Parameters:
      s - The String to pad
      n - Number of digits in sum
      chr - The actual padding character
      Returns:
      A new padded String instance
    • trimRight

      public static String trimRight(String s, char chr)
      Trim the given StringĀ s about the character chr.
      Parameters:
      s - The String to analyse
      chr - The character to remove from the right end sid
      Returns:
      A new trimmed String instance
    • padLeft

      public static String padLeft(String s, int n, String chr)
      Pad a String s with a number n of characters chr.
      Parameters:
      s - The String to pad
      n - Number of digits in sum
      chr - The actual padding character
      Returns:
      A new padded String instance
    • nullableBarcode

      public static String nullableBarcode(String barcode)
      Return the standard telegram representation (???..) if the barcode is null.
      Parameters:
      barcode - The Barcode to translate
      Returns:
      The barcode or ????????????????????
    • nullableLocation

      public static String nullableLocation(String locationId)
      Return the standard telegram representation (***..) if the locationId is null.
      Parameters:
      locationId - The LocationId to translate
      Returns:
      The normalized LocationId or ********************
    • nullableLocationGroup

      public static String nullableLocationGroup(String locationGroup)
      Return the standard telegram representation (***..) if the locationGroup is null.
      Parameters:
      locationGroup - The name of the LocationGroup to analyse
      Returns:
      The normalized name or ********************