From 2c146c894972e2c6ab701b3c66dcf242d7be656f Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Tue, 24 Dec 2019 16:16:13 -0500 Subject: Added Javadoc to the project. --- .../math/ConditionalExistenceCollections.html | 397 +++++++++++++++++++++ 1 file changed, 397 insertions(+) create mode 100644 doc/org/unitConverter/math/ConditionalExistenceCollections.html (limited to 'doc/org/unitConverter/math/ConditionalExistenceCollections.html') diff --git a/doc/org/unitConverter/math/ConditionalExistenceCollections.html b/doc/org/unitConverter/math/ConditionalExistenceCollections.html new file mode 100644 index 0000000..2764146 --- /dev/null +++ b/doc/org/unitConverter/math/ConditionalExistenceCollections.html @@ -0,0 +1,397 @@ + + + + + +ConditionalExistenceCollections + + + + + + + + +
+ + + + + + + +
+ + + +
+
org.unitConverter.math
+

Class ConditionalExistenceCollections

+
+
+ +
+
    +
  • +
    +
    +
    public final class ConditionalExistenceCollections
    +extends java.lang.Object
    +
    Elements in these wrapper collections only exist if they pass a condition. +

    + All of the collections in this class are "views" of the provided collections. They are mutable if the provided + collections are mutable, they allow null if the provided collections allow null, they will reflect changes in the + provided collection, etc. +

    + The modification operations will always run the corresponding operations, even if the conditional existence + collection doesn't change. For example, if you have a set that ignores even numbers, add(2) will still add a 2 to the + backing set (but the conditional existence set will say it doesn't exist). +

    + The returned collections do not pass the hashCode and equals operations through to the backing collections, + but rely on Object's equals and hashCode methods. This is necessary to preserve the contracts + of these operations in the case that the backing collections are sets or lists. +

    + Other than that, the only difference between the provided collections and the returned collections are that + elements don't exist if they don't pass the provided condition.

    +
    +
    Since:
    +
    2019-10-17
    +
    Author:
    +
    Adrien Hopkins
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <E> java.util.Collection<E>conditionalExistenceCollection(java.util.Collection<E> collection, + java.util.function.Predicate<E> existenceCondition) +
      Elements in the returned wrapper collection are ignored if they don't pass a condition.
      +
      static <E> java.util.Iterator<E>conditionalExistenceIterator(java.util.Iterator<E> iterator, + java.util.function.Predicate<E> existenceCondition) +
      Elements in the returned wrapper iterator are ignored if they don't pass a condition.
      +
      static <K,V> java.util.Map<K,V>conditionalExistenceMap(java.util.Map<K,V> map, + java.util.function.Predicate<java.util.Map.Entry<K,V>> entryExistenceCondition) +
      Mappings in the returned wrapper map are ignored if the corresponding entry doesn't pass a condition
      +
      static <E> java.util.Set<E>conditionalExistenceSet(java.util.Set<E> set, + java.util.function.Predicate<E> existenceCondition) +
      Elements in the returned wrapper set are ignored if they don't pass a condition.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        ConditionalExistenceCollections

        +
        public ConditionalExistenceCollections()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        conditionalExistenceCollection

        +
        public static final <E> java.util.Collection<E> conditionalExistenceCollection(java.util.Collection<E> collection,
        +                                                                               java.util.function.Predicate<E> existenceCondition)
        +
        Elements in the returned wrapper collection are ignored if they don't pass a condition.
        +
        +
        Type Parameters:
        +
        E - type of elements in collection
        +
        Parameters:
        +
        collection - collection to wrap
        +
        existenceCondition - elements only exist if this returns true
        +
        Returns:
        +
        wrapper collection
        +
        Since:
        +
        2019-10-17
        +
        +
      • +
      + + + +
        +
      • +

        conditionalExistenceIterator

        +
        public static final <E> java.util.Iterator<E> conditionalExistenceIterator(java.util.Iterator<E> iterator,
        +                                                                           java.util.function.Predicate<E> existenceCondition)
        +
        Elements in the returned wrapper iterator are ignored if they don't pass a condition.
        +
        +
        Type Parameters:
        +
        E - type of elements in iterator
        +
        Parameters:
        +
        iterator - iterator to wrap
        +
        existenceCondition - elements only exist if this returns true
        +
        Returns:
        +
        wrapper iterator
        +
        Since:
        +
        2019-10-17
        +
        +
      • +
      + + + +
        +
      • +

        conditionalExistenceMap

        +
        public static final <K,V> java.util.Map<K,V> conditionalExistenceMap(java.util.Map<K,V> map,
        +                                                                     java.util.function.Predicate<java.util.Map.Entry<K,V>> entryExistenceCondition)
        +
        Mappings in the returned wrapper map are ignored if the corresponding entry doesn't pass a condition
        +
        +
        Type Parameters:
        +
        K - type of key in map
        +
        V - type of value in map
        +
        Parameters:
        +
        map - map to wrap
        +
        entryExistenceCondition - mappings only exist if this returns true
        +
        Returns:
        +
        wrapper map
        +
        Since:
        +
        2019-10-17
        +
        +
      • +
      + + + +
        +
      • +

        conditionalExistenceSet

        +
        public static final <E> java.util.Set<E> conditionalExistenceSet(java.util.Set<E> set,
        +                                                                 java.util.function.Predicate<E> existenceCondition)
        +
        Elements in the returned wrapper set are ignored if they don't pass a condition.
        +
        +
        Type Parameters:
        +
        E - type of elements in set
        +
        Parameters:
        +
        set - set to wrap
        +
        existenceCondition - elements only exist if this returns true
        +
        Returns:
        +
        wrapper set
        +
        Since:
        +
        2019-10-17
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3