-
- -

Class ConditionalExistenceCollections.ConditionalExistenceIterator<E>

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • org.unitConverter.math.ConditionalExistenceCollections.ConditionalExistenceIterator<E>
    • -
    -
  • -
-
-
    -
  • -
    -
    Type Parameters:
    -
    E - type of elements in iterator
    -
    -
    -
    All Implemented Interfaces:
    -
    java.util.Iterator<E>
    -
    -
    -
    Enclosing class:
    -
    ConditionalExistenceCollections
    -
    -
    -
    static final class ConditionalExistenceCollections.ConditionalExistenceIterator<E>
    -extends java.lang.Object
    -implements java.util.Iterator<E>
    -
    Elements in this wrapper iterator only exist if they pass a condition.
    -
    -
    Since:
    -
    2019-10-17
    -
    Author:
    -
    Adrien Hopkins
    -
    -
  • -
-
-
-
    -
  • - -
    -
      -
    • - - -

      Field Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Fields 
      Modifier and TypeFieldDescription
      (package private) java.util.function.Predicate<E>existenceCondition 
      (package private) booleanhasNext 
      (package private) java.util.Iterator<E>iterator 
      (package private) EnextElement 
      -
    • -
    -
    - -
    -
      -
    • - - -

      Constructor Summary

      - - - - - - - - - - - - -
      Constructors 
      ModifierConstructorDescription
      private ConditionalExistenceIterator​(java.util.Iterator<E> iterator, - java.util.function.Predicate<E> condition) -
      Creates the ConditionalExistenceIterator.
      -
      -
    • -
    -
    - -
    -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      private voidgetAndSetNextElement() -
      Gets the next element, and sets nextElement and hasNext accordingly.
      -
      booleanhasNext() 
      Enext() 
      voidremove() 
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
        -
      • - - -

        Methods inherited from interface java.util.Iterator

        -forEachRemaining
      • -
      -
    • -
    -
    -
  • -
-
-
-
    -
  • - -
    -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        iterator

        -
        final java.util.Iterator<E> iterator
        -
      • -
      - - - -
        -
      • -

        existenceCondition

        -
        final java.util.function.Predicate<E> existenceCondition
        -
      • -
      - - - -
        -
      • -

        nextElement

        -
        E nextElement
        -
      • -
      - - - -
        -
      • -

        hasNext

        -
        boolean hasNext
        -
      • -
      -
    • -
    -
    - -
    -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ConditionalExistenceIterator

        -
        private ConditionalExistenceIterator​(java.util.Iterator<E> iterator,
        -                                     java.util.function.Predicate<E> condition)
        -
        Creates the ConditionalExistenceIterator.
        -
        -
        Parameters:
        -
        iterator -
        -
        condition -
        -
        Since:
        -
        2019-10-17
        -
        -
      • -
      -
    • -
    -
    - -
    -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getAndSetNextElement

        -
        private void getAndSetNextElement()
        -
        Gets the next element, and sets nextElement and hasNext accordingly.
        -
        -
        Since:
        -
        2019-10-17
        -
        -
      • -
      - - - -
        -
      • -

        hasNext

        -
        public boolean hasNext()
        -
        -
        Specified by:
        -
        hasNext in interface java.util.Iterator<E>
        -
        -
      • -
      - - - -
        -
      • -

        next

        -
        public E next()
        -
        -
        Specified by:
        -
        next in interface java.util.Iterator<E>
        -
        -
      • -
      - - - -
        -
      • -

        remove

        -
        public void remove()
        -
        -
        Specified by:
        -
        remove in interface java.util.Iterator<E>
        -
        -
      • -
      -
    • -
    -
    -
  • -
-
-
-