Class TypedPosition

  • public class TypedPosition
    extends Position
    Convenience class for positions that have a type, similar to ITypedRegion.

    As Position,TypedPosition can not be used as key in hash tables as it overrides equals and hashCode as it would be a value object.

    • Constructor Detail

      • TypedPosition

        public TypedPosition​(int offset,
                             int length,
                             String type)
        Creates a position along the given specification.
        offset - the offset of this position
        length - the length of this position
        type - the content type of this position
      • TypedPosition

        public TypedPosition​(ITypedRegion region)
        Creates a position based on the typed region.
        region - the typed region
    • Method Detail

      • getType

        public String getType()
        Returns the content type of the region.
        the content type of the region