Interface IHasSize

All Known Subinterfaces:
ICache<KEYTYPE,VALUETYPE>, ICallbackList<CALLBACKTYPE>, ICommonsCollection<ELEMENTTYPE>, ICommonsList<ELEMENTTYPE>, ICommonsNavigableSet<ELEMENTTYPE>, ICommonsOrderedSet<ELEMENTTYPE>, ICommonsSet<ELEMENTTYPE>, ICommonsSortedSet<ELEMENTTYPE>, IErrorList, IHasByteArray, IMutableCache<KEYTYPE,VALUETYPE>
All Known Implementing Classes:
ByteArrayInputStreamProvider, ByteArrayWrapper, Cache, CallbackList, CommonsArrayList, CommonsCopyOnWriteArrayList, CommonsCopyOnWriteArraySet, CommonsHashSet, CommonsLinkedHashSet, CommonsLinkedList, CommonsTreeSet, CommonsVector, DateTimeFormatterCache, ErrorList, HttpHeaderMap, InMemoryLogger, LRUSet, MappedCache, NonBlockingByteArrayOutputStream, NonBlockingStack, NonBlockingStringWriter, PDTFormatter.LocalizedDateFormatCache, ReadableResourceByteArray, ReadableResourceString, RegExCache, URLParameterList

public interface IHasSize
Base interface for all objects having a certain size with int precision.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    default boolean
     
    int
     
  • Method Details

    • size

      @Nonnegative int size()
      Returns:
      The number of contained elements. Always ≥ 0.
    • isEmpty

      boolean isEmpty()
      Returns:
      true if no items are present, false if at least a single item is present.
      See Also:
    • isNotEmpty

      default boolean isNotEmpty()
      Returns:
      true if at least one item is present, false if no item is present.
      See Also: