Class NetricsArrayRecOpSrc

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRecOp​(NetricsRecOp... rec_ops)
      Add a set of record operations to the source.
      boolean canReset()
      Returns true as this class supports the reset operation.
      NetricsRecOp getCur()
      Returns the current record operation.
      NetricsRecOp getNext()
      Returns the next record operation.
      boolean hasNext()
      True if getNext will return a record operation.
      void reset()
      Reset the scan of record back to the beginning.
      int size()
      Return the number of RecOps in this source.
      • Methods inherited from class java.lang.Object

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

      • NetricsArrayRecOpSrc

        public NetricsArrayRecOpSrc()
        Create an empty source. This creates an empty source. Record operations must be added using addRecOp.
      • NetricsArrayRecOpSrc

        public NetricsArrayRecOpSrc​(NetricsRecOp... rec_ops)
        Create a source with an initial set of record operations. This creates a record operation source and populates it with an initial set of record operations.
        Parameters:
        rec_ops - the initial record operations.
    • Method Detail

      • addRecOp

        public void addRecOp​(NetricsRecOp... rec_ops)
        Add a set of record operations to the source. This adds a set of record operations to the end of the current list of record operations for this source.
        Parameters:
        rec_ops - the set of record operations to add.
      • size

        public int size()
        Return the number of RecOps in this source.
        Returns:
        the total number RecOps in this source object.
      • hasNext

        public boolean hasNext()
        True if getNext will return a record operation.
        Specified by:
        hasNext in interface NetricsRecOpSrc
        Returns:
        True if there is another record operation, false otherwise.
      • getNext

        public NetricsRecOp getNext()
        Returns the next record operation.
        Specified by:
        getNext in interface NetricsRecOpSrc
        Returns:
        the next record operation, null if there is no next record.
      • getCur

        public NetricsRecOp getCur()
        Returns the current record operation. This returns the last record operation fetched. If no record operation has been fetched, or getNext() was called at the end of file, this returns null.
        Specified by:
        getCur in interface NetricsRecOpSrc
        Returns:
        the current record operation, null if no current record operation set.
      • canReset

        public boolean canReset()
        Returns true as this class supports the reset operation.
        Specified by:
        canReset in interface NetricsRecOpSrc
        Returns:
        true
      • reset

        public void reset()
        Reset the scan of record back to the beginning. This resets the scan of records back to the initial state. After this call there is no current record and getNext will retrieve the first record.
        Specified by:
        reset in interface NetricsRecOpSrc