Class AbstractMutableBooleanValuesMap

java.lang.Object
org.eclipse.collections.impl.primitive.AbstractBooleanIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableBooleanValuesMap
All Implemented Interfaces:
BooleanIterable, BooleanValuesMap, MutableBooleanValuesMap, PrimitiveIterable
Direct Known Subclasses:
ByteBooleanHashMap, CharBooleanHashMap, DoubleBooleanHashMap, FloatBooleanHashMap, IntBooleanHashMap, LongBooleanHashMap, ShortBooleanHashMap

public abstract class AbstractMutableBooleanValuesMap extends AbstractBooleanIterable implements MutableBooleanValuesMap
  • Constructor Details

    • AbstractMutableBooleanValuesMap

      public AbstractMutableBooleanValuesMap()
  • Method Details

    • getOccupiedWithData

      protected abstract int getOccupiedWithData()
    • getSentinelValues

      protected abstract AbstractMutableBooleanValuesMap.SentinelValues getSentinelValues()
    • setSentinelValuesNull

      protected abstract void setSentinelValuesNull()
    • getEmptyValue

      protected abstract boolean getEmptyValue()
    • getValueAtIndex

      protected abstract boolean getValueAtIndex(int index)
    • getTableSize

      protected abstract int getTableSize()
    • isNonSentinelAtIndex

      protected abstract boolean isNonSentinelAtIndex(int index)
    • addEmptyKeyValue

      protected void addEmptyKeyValue(boolean value)
    • removeEmptyKey

      protected void removeEmptyKey()
    • addRemovedKeyValue

      protected void addRemovedKeyValue(boolean value)
    • removeRemovedKey

      protected void removeRemovedKey()
    • contains

      public boolean contains(boolean value)
      Description copied from interface: BooleanIterable
      Returns true if the value is contained in the BooleanIterable, and false if it is not.
      Specified by:
      contains in interface BooleanIterable
    • containsAll

      public boolean containsAll(BooleanIterable source)
      Description copied from interface: BooleanIterable
      Returns true if all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.
      Specified by:
      containsAll in interface BooleanIterable
    • size

      public int size()
      Description copied from interface: PrimitiveIterable
      Returns the number of items in this iterable.
      Specified by:
      size in interface PrimitiveIterable
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: PrimitiveIterable
      Returns true if this iterable has zero items.
      Specified by:
      isEmpty in interface PrimitiveIterable
    • notEmpty

      public boolean notEmpty()
      Description copied from interface: PrimitiveIterable
      The English equivalent of !this.isEmpty()
      Specified by:
      notEmpty in interface PrimitiveIterable
    • forEach

      public void forEach(BooleanProcedure procedure)
      Description copied from interface: BooleanIterable
      Applies the BooleanProcedure to each element in the BooleanIterable.
      Specified by:
      forEach in interface BooleanIterable
    • each

      public void each(BooleanProcedure procedure)
      Description copied from interface: BooleanIterable
      A synonym for forEach.
      Specified by:
      each in interface BooleanIterable
      Since:
      7.0.
    • forEachValue

      public void forEachValue(BooleanProcedure procedure)
      Description copied from interface: BooleanValuesMap
      Iterates through each value in this map.
      Specified by:
      forEachValue in interface BooleanValuesMap
      Parameters:
      procedure - the procedure to invoke for each value in this map.
    • injectInto

      public <V> V injectInto(V injectedValue, ObjectBooleanToObjectFunction<? super V,? extends V> function)
      Specified by:
      injectInto in interface BooleanIterable
    • chunk

      public RichIterable<BooleanIterable> chunk(int size)
      Description copied from interface: BooleanIterable
      Partitions elements in fixed size chunks.
      Specified by:
      chunk in interface BooleanIterable
      Parameters:
      size - the number of elements per chunk
      Returns:
      A RichIterable containing BooleanIterables of size size, except the last will be truncated if the elements don't divide evenly.
    • appendString

      public void appendString(Appendable appendable, String start, String separator, String end)
      Description copied from interface: PrimitiveIterable
      Prints a string representation of this collection onto the given Appendable. Prints the string returned by PrimitiveIterable.makeString(String, String, String).
      Specified by:
      appendString in interface PrimitiveIterable
    • select

      public MutableBooleanBag select(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.
      Specified by:
      select in interface BooleanIterable
      Specified by:
      select in interface BooleanValuesMap
      Specified by:
      select in interface MutableBooleanValuesMap
    • reject

      public MutableBooleanBag reject(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.
      Specified by:
      reject in interface BooleanIterable
      Specified by:
      reject in interface BooleanValuesMap
      Specified by:
      reject in interface MutableBooleanValuesMap
    • collect

      public <V> MutableBag<V> collect(BooleanToObjectFunction<? extends V> function)
      Description copied from interface: BooleanIterable
      Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.
      Specified by:
      collect in interface BooleanIterable
      Specified by:
      collect in interface BooleanValuesMap
      Specified by:
      collect in interface MutableBooleanValuesMap
    • detectIfNone

      public boolean detectIfNone(BooleanPredicate predicate, boolean value)
      Specified by:
      detectIfNone in interface BooleanIterable
    • count

      public int count(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.
      Specified by:
      count in interface BooleanIterable
    • anySatisfy

      public boolean anySatisfy(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      anySatisfy in interface BooleanIterable
    • allSatisfy

      public boolean allSatisfy(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      allSatisfy in interface BooleanIterable
    • noneSatisfy

      public boolean noneSatisfy(BooleanPredicate predicate)
      Description copied from interface: BooleanIterable
      Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      noneSatisfy in interface BooleanIterable
    • toArray

      public boolean[] toArray()
      Description copied from interface: BooleanIterable
      Converts the BooleanIterable to a primitive boolean array.
      Specified by:
      toArray in interface BooleanIterable
    • toArray

      public boolean[] toArray(boolean[] array)
      Description copied from interface: BooleanIterable
      Converts the BooleanIterable to a primitive boolean array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.
      Specified by:
      toArray in interface BooleanIterable