code: private static void checkForValidEscapedCharacter(int index, String labelDescriptor) {
  
          if (index >= labelDescriptor.length()) {
              throw new IllegalArgumentException(
                      "The label descriptor contains an invalid escape sequence. Backslash "
                      + "characters (\\) must be followed by either an ampersand (&) or another "
                      + "backslash.");
          }
  
          char escapedChar = labelDescriptor.charAt(index);
  
          if (escapedChar != '&' && escapedChar != '\\') {
              throw new IllegalArgumentException(
                      "The label descriptor ["
                      + labelDescriptor
                      + "] contains an invalid escape sequence. Backslash "
                      + "characters (\\) must be followed by either an ampersand (&) or another "
                      + "backslash.");
          }
  
      }
docs: Confirms that the character at the specified index within the given label descriptor is
  a valid 'escapable' character. i.e. either an ampersand or backslash.
  
  @param index The position within the label descriptor of the character to be checked.
  @param labelDescriptor The label descriptor.
  
  @throws NullPointerException if {@code labelDescriptor} is null.
  @throws IllegalArgumentException if the given {@code index} position is beyond the length
  of the string or if the character at that position is not an ampersand or backslash.