src/main/java/com/ve/cxe/commons/collection/CyclicFixedPump.java
/**
     * @param Object[] container to pump into, the length of the container is expected to be equal to that of Pumping Volume
     * @return Empty when pump runs dry, else pumping volume quantity is pumped out to the Container parameter
     */
@param Object[] container to pump into, the length of the container is expected to be equal to that of Pumping Volume
@return Empty when pump runs dry, else pumping volume quantity is pumped out to the Container parameter
@param Object [] container to pump into the length of the container is expected to be equal to that of Pumping Volume @return Empty when pump runs dry else pumping volume quantity is pumped out to the Container parameter
public Object[] pump(Object[] container) {
        if (current == 0 || container == null) {
            return EMPTY_CONTAINER;
        }
        int tempPumpingVolume = container.length < pumpingVolume ? container.length : pumpingVolume;
        int valveCounter = 0;
        while (valveCounter < tempPumpingVolume) {
            cycleMaker = cycleMaker == 0 ? current : cycleMaker;
            cycleMaker--;
            valve[valveCounter] = values[cycleMaker];
            container[valveCounter] = values[cycleMaker];
            valveCounter++;
        }
        return container;
    }
public Object [ ] pump ( Object [ ] container ) { if ( current == 0 || container == null ) { return EMPTY_CONTAINER ; } int tempPumpingVolume = container . length < pumpingVolume ? container . length : pumpingVolume ; int valveCounter = 0 ; while ( valveCounter < tempPumpingVolume ) { cycleMaker = cycleMaker == 0 ? current : cycleMaker ; cycleMaker -- ; valve [ valveCounter ] = values [ cycleMaker ] ; container [ valveCounter ] = values [ cycleMaker ] ; valveCounter ++ ; } return container ; }
@param Object[] container to pump into, the length of the container is expected to be equal to that of Pumping Volume
 @return Empty when pump runs dry, else pumping volume quantity is pumped out to the Container parameter
@param Object [] container to pump into the length of the container is expected to be equal to that of Pumping Volume @return Empty when pump runs dry else pumping volume quantity is pumped out to the Container parameter
//Pump is running dry, and returns empty (never null) //If a container is smaller than pumping volume then Container Overflow (IOOBExp) for sure, so reduce the pumping volume just for this case //Because - We do not entertain data loss due to overflow!! //Shrink the circular pointer //Cycle from Marker to valve //Copy the same into the Container ( valve has the same data, but user has placed a container to collect)