Package io.karma.sliced.view.impl
Class EmptyStackView<T>
java.lang.Object
io.karma.sliced.view.impl.EmptyStackView<T>
- Since:
- 25/02/2024
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasSlice()
Creates a new slice instance from this view instance containing the same underlying collection reference, or a newly created wrapper list if there's no specialization available for the type of the underlying collection.iterator()
peek()
Retrieves the current, topmost element on the stack.int
size()
Retrieves the number of elements contained within the array/collection referenced by this array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.karma.sliced.view.View
contains, containsAll, containsAllRefs, containsRef, contentEquals, contentEquals, copy, copyArrayList, copyHashSet, forAll, forAllIndexed, forEachIndexed, parallelStream, referencesEqual, referencesEqual, stream, toArray
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EmptyStackView
public EmptyStackView()
-
-
Method Details
-
peek
Description copied from interface:StackView
Retrieves the current, topmost element on the stack. Returns null if the stack is empty. -
size
public int size()Description copied from interface:View
Retrieves the number of elements contained within the array/collection referenced by this array. -
asSlice
Description copied from interface:View
Creates a new slice instance from this view instance containing the same underlying collection reference, or a newly created wrapper list if there's no specialization available for the type of the underlying collection. Note If you want to create slices directly, seeSlice.of(Object[])
and it's overloads. -
iterator
-