Class AbstractRangeLocation

    • Method Detail

      • blockIterator

        public Iterator blockIterator()
        Description copied from interface: Location
        Return an Iterator over the set of maximal contiguous sub-locations.

        Given any location, it can be considered to contain zero or more maximal contiguous blocks of width 1 or greater. The empty location is composed from nothing. A contiguous location is composed from itself. A non-contiguous location is composed from contiguous blocks seperated by gaps.

        This method should return an Iterator over these maximally contiguous blocks starting with the left-most block, and finishing at the right-most block.

        Returns:
        an Iterator over Location objects that are the maximally contiguous set of locations contained within this location
      • isContiguous

        public boolean isContiguous()
        Description copied from interface: Location
        Determine if a Location is contiguous.
        Returns:
        true if and only if this Location contains every point from min to max inclusive.
      • symbols

        public SymbolList symbols​(SymbolList seq)
        Description copied from interface: Location
        Return the symbols in a sequence that fall within this range.
        Parameters:
        seq - the SymbolList to process
        Returns:
        the SymbolList containing the symbols in seq in this range
      • contains

        public boolean contains​(int p)
        Description copied from interface: Location
        Checks if this location contains a point.
        Parameters:
        p - the point to check
        Returns:
        true if this contains p, otherwise false