-
- -

Class UnitDatabase.PrefixedUnitMap.PrefixedUnitNameSet

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • java.util.AbstractCollection<E>
    • -
    • -
        -
      • java.util.AbstractSet<java.lang.String>
      • -
      • -
          -
        • org.unitConverter.unit.UnitDatabase.PrefixedUnitMap.PrefixedUnitNameSet
        • -
        -
      • -
      -
    • -
    -
  • -
-
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.Set<java.lang.String>
    -
    -
    -
    Enclosing class:
    -
    UnitDatabase.PrefixedUnitMap
    -
    -
    -
    private static final class UnitDatabase.PrefixedUnitMap.PrefixedUnitNameSet
    -extends java.util.AbstractSet<java.lang.String>
    -
    The class used for unit name sets. - -

    - If the map that created this set is infinite in size (has at least one unit and at least one prefix), this - set is infinite as well. If this set is infinite in size, toArray() will fail with a - IllegalStateException instead of creating an infinite-sized array. -

    -
    -
    Since:
    -
    2019-04-13, v0.2.0
    -
    Author:
    -
    Adrien Hopkins
    -
    -
  • -
-
-
-
    -
  • - -
    - -
    - -
    - -
    - -
    - -
    - -
    -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanadd​(java.lang.String e) 
      booleanaddAll​(java.util.Collection<? extends java.lang.String> c) 
      voidclear() 
      booleancontains​(java.lang.Object o) 
      booleancontainsAll​(java.util.Collection<?> c) 
      booleanisEmpty() 
      java.util.Iterator<java.lang.String>iterator() 
      booleanremove​(java.lang.Object o) 
      booleanremoveAll​(java.util.Collection<?> c) 
      booleanremoveIf​(java.util.function.Predicate<? super java.lang.String> filter) 
      booleanretainAll​(java.util.Collection<?> c) 
      intsize() 
      java.lang.Object[]toArray() 
      <T> T[]toArray​(T[] a) 
      java.lang.StringtoString() 
      -
        -
      • - - -

        Methods inherited from class java.util.AbstractSet

        -equals, hashCode
      • -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • -
      -
        -
      • - - -

        Methods inherited from interface java.util.Collection

        -parallelStream, stream, toArray
      • -
      -
        -
      • - - -

        Methods inherited from interface java.lang.Iterable

        -forEach
      • -
      -
        -
      • - - -

        Methods inherited from interface java.util.Set

        -spliterator
      • -
      -
    • -
    -
    -
  • -
-
-
-
    -
  • - -
    - -
    - -
    -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        PrefixedUnitNameSet

        -
        public PrefixedUnitNameSet​(UnitDatabase.PrefixedUnitMap map)
        -
        Creates the PrefixedUnitNameSet.
        -
        -
        Parameters:
        -
        map - map that created this set
        -
        Since:
        -
        2019-04-13, v0.2.0
        -
        -
      • -
      -
    • -
    -
    - -
    -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        add

        -
        public boolean add​(java.lang.String e)
        -
        -
        Specified by:
        -
        add in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        add in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        add in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        addAll

        -
        public boolean addAll​(java.util.Collection<? extends java.lang.String> c)
        -
        -
        Specified by:
        -
        addAll in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        addAll in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        addAll in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        clear

        -
        public void clear()
        -
        -
        Specified by:
        -
        clear in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        clear in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        clear in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        contains

        -
        public boolean contains​(java.lang.Object o)
        -
        -
        Specified by:
        -
        contains in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        contains in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        contains in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        containsAll

        -
        public boolean containsAll​(java.util.Collection<?> c)
        -
        -
        Specified by:
        -
        containsAll in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        containsAll in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        containsAll in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        isEmpty

        -
        public boolean isEmpty()
        -
        -
        Specified by:
        -
        isEmpty in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        isEmpty in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        isEmpty in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        iterator

        -
        public java.util.Iterator<java.lang.String> iterator()
        -
        -
        Specified by:
        -
        iterator in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        iterator in interface java.lang.Iterable<java.lang.String>
        -
        Specified by:
        -
        iterator in interface java.util.Set<java.lang.String>
        -
        Specified by:
        -
        iterator in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        remove

        -
        public boolean remove​(java.lang.Object o)
        -
        -
        Specified by:
        -
        remove in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        remove in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        remove in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        removeAll

        -
        public boolean removeAll​(java.util.Collection<?> c)
        -
        -
        Specified by:
        -
        removeAll in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        removeAll in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        removeAll in class java.util.AbstractSet<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        removeIf

        -
        public boolean removeIf​(java.util.function.Predicate<? super java.lang.String> filter)
        -
      • -
      - - - -
        -
      • -

        retainAll

        -
        public boolean retainAll​(java.util.Collection<?> c)
        -
        -
        Specified by:
        -
        retainAll in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        retainAll in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        retainAll in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        size

        -
        public int size()
        -
        -
        Specified by:
        -
        size in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        size in interface java.util.Set<java.lang.String>
        -
        Specified by:
        -
        size in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      - - - -
        -
      • -

        toArray

        -
        public java.lang.Object[] toArray()
        -
        -
        Specified by:
        -
        toArray in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        toArray in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        toArray in class java.util.AbstractCollection<java.lang.String>
        -
        Throws:
        -
        java.lang.IllegalStateException - if the set is infinite in size
        -
        -
      • -
      - - - - - -
        -
      • -

        toArray

        -
        public <T> T[] toArray​(T[] a)
        -
        -
        Specified by:
        -
        toArray in interface java.util.Collection<java.lang.String>
        -
        Specified by:
        -
        toArray in interface java.util.Set<java.lang.String>
        -
        Overrides:
        -
        toArray in class java.util.AbstractCollection<java.lang.String>
        -
        Throws:
        -
        java.lang.IllegalStateException - if the set is infinite in size
        -
        -
      • -
      - - - -
        -
      • -

        toString

        -
        public java.lang.String toString()
        -
        -
        Overrides:
        -
        toString in class java.util.AbstractCollection<java.lang.String>
        -
        -
      • -
      -
    • -
    -
    -
  • -
-
-
-