Class IntProcedureEntriesList

  • All Implemented Interfaces:
    IntProcedure

    public class IntProcedureEntriesList
    extends Object
    implements IntProcedure
    The IntProcedureEntriesList class provides an implementation of an IntProcedure and records node id's from its execution in a list.

    Simply pass an instance of this class to an rtree search and access the retrieved nodes' indices with get(int) and getValues(). These indices are returned as Integer objects.
    • Constructor Detail

      • IntProcedureEntriesList

        public IntProcedureEntriesList()
        Initializes an empty instance of a IntProcedureEntriesList
    • Method Detail

      • execute

        public boolean execute​(int id)
        Caches the id passed from the calling method to the list. This method is utilized primarily for the purpose of rtree searches and is usually not invoked explicitly
        Specified by:
        execute in interface IntProcedure
        Parameters:
        id - a node id (from an RTree)
        Returns:
        true if execution succeeds. Execution may be halted by returning false.
      • clear

        public void clear()
        Removes all elements from the internal list. The list will be empty after this call returns, but will maintain its current capacity.
      • get

        public int get​(int index)
                throws IndexOutOfBoundsException
        Returns the value of the element at the specified position in the internal list.
        Parameters:
        index - the index of the element to return
        Returns:
        the int value of the entry at the given index
        Throws:
        IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size())
      • getSize

        public int getSize()
        Returns the number of elements contained in this object's internal list.
        Returns:
        the number of elements contained in this object's internal list.
      • getValues

        public cern.colt.list.AbstractIntList getValues()
        Retrieves a deep copy of the internal entry list
        Returns:
        an AbstractIntList