Package apg

Class UdtLib.Any

  • Enclosing class:
    UdtLib

    public static class UdtLib.Any
    extends Parser.UdtCallback
    UDT for recognizing a string of any printing characters. That is, ASCII characters 32-126.
    • Constructor Summary

      Constructors 
      Constructor Description
      Any​(Parser p)
      The default constructor.
      Any​(Parser p, boolean spaceAllowed)
      Constructor to include/exclude spaces (x20) from the set of allowed characters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int callback​(int offset)
      The UDT function.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Any

        public Any​(Parser p)
        The default constructor.
        Parameters:
        p - the Parser object the UDT is attached to.
      • Any

        public Any​(Parser p,
                   boolean spaceAllowed)
        Constructor to include/exclude spaces (x20) from the set of allowed characters.
        Parameters:
        p - the Parser object the UDT is attached to.
        spaceAllowed - if true, spaces are included, if false, spaces are excluded.
    • Method Detail

      • callback

        public int callback​(int offset)
        Description copied from class: Parser.UdtCallback
        The UDT function.
        Specified by:
        callback in class Parser.UdtCallback
        Parameters:
        offset - offset into the input string to the first character of the parsed phrase.
        Returns:
        the matched phrase length, L, or -1 if no phrase was matched. The phrase length must be in the range 0 <= L <=(n-1), where n is the remaining number of characters in the input string.