Package com.helger.commons.lang
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 IHasSizeBase interface for all objects having a certain size.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanisEmpty()default booleanisNotEmpty()intsize()
-
-
-
Method Detail
-
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:
size(),isNotEmpty()
-
-