Package bsh

Class CollectionManager.BasicBshIterator

    • Constructor Detail

      • BasicBshIterator

        public BasicBshIterator​(Object iterateOverMe)
        Construct a basic BasicBshIterator
        Parameters:
        The - object over which we are iterating
        Throws:
        IllegalArgumentException - If the argument is not a supported (i.e. iterable) type.
        NullPointerException - If the argument is null
    • Method Detail

      • createEnumeration

        protected Enumeration createEnumeration​(Object iterateOverMe)
        Create an enumeration over the given object
        Parameters:
        iterateOverMe - Object of type Enumeration, Vector, String, StringBuffer or an array
        Returns:
        an enumeration
        Throws:
        IllegalArgumentException - If the argument is not a supported (i.e. iterable) type.
        NullPointerException - If the argument is null
      • next

        public Object next()
        Fetch the next object in the iteration
        Specified by:
        next in interface BshIterator
        Returns:
        The next object
      • hasNext

        public boolean hasNext()
        Returns true if and only if there are more objects available via the next() method
        Specified by:
        hasNext in interface BshIterator
        Returns:
        The next object