Class MessagePattern.Part

  • Enclosing class:
    MessagePattern

    public static final class MessagePattern.Part
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MessagePattern.Part.Type
      Part type constants.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MessagePattern.ArgType getArgType()
      Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.
      int getIndex()
      Returns the pattern string index associated with this Part.
      int getLength()
      Returns the length of the pattern substring associated with this Part.
      int getLimit()
      Returns the pattern string limit (exclusive-end) index associated with this Part.
      MessagePattern.Part.Type getType()
      Returns the type of this part.
      int getValue()
      Returns a value associated with this part.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getIndex

        public int getIndex()
        Returns the pattern string index associated with this Part.
        Returns:
        this part's pattern string index.
      • getLength

        public int getLength()
        Returns the length of the pattern substring associated with this Part. This is 0 for some parts.
        Returns:
        this part's pattern substring length.
      • getLimit

        public int getLimit()
        Returns the pattern string limit (exclusive-end) index associated with this Part. Convenience method for getIndex()+getLength().
        Returns:
        this part's pattern string limit index, same as getIndex()+getLength().
      • getValue

        public int getValue()
        Returns a value associated with this part. See the documentation of each part type for details.
        Returns:
        the part value.
      • getArgType

        public MessagePattern.ArgType getArgType()
        Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.
        Returns:
        the argument type for this part.