Package com.helger.base.iface
Interface IHasSize
- All Known Subinterfaces:
ICallbackList<CALLBACKTYPE>,IHasByteArray
- All Known Implementing Classes:
ByteArrayInputStreamProvider,ByteArrayWrapper,CallbackList,NonBlockingByteArrayOutputStream,NonBlockingStringWriter
public interface IHasSize
Base interface for all objects having a certain size with int precision.
- Author:
- Philip Helger
-
Method Summary
-
Method Details
-
size
@Nonnegative int size()- Returns:
- The number of contained elements. Always ≥ 0.
-
isEmpty
boolean isEmpty()- Returns:
trueif no items are present,falseif at least a single item is present.- See Also:
-
isNotEmpty
default boolean isNotEmpty()- Returns:
trueif at least one item is present,falseif no item is present.- See Also:
-