Class EntryViews.NoValueReadOnlyView<K,V>
java.lang.Object
org.infinispan.functional.impl.EntryViews.NoValueReadOnlyView<K,V>
- All Implemented Interfaces:
EntryView.ReadEntryView<K,
,V> MetaParam.Lookup
- Enclosing class:
EntryViews
@ProtoTypeId(1074)
public static final class EntryViews.NoValueReadOnlyView<K,V>
extends Object
implements EntryView.ReadEntryView<K,V>
- Since:
- 8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind()
Optional value.findMetaParam
(Class<T> type) get()
Returns a non-null value if the key has a value associated with it or throwsNoSuchElementException
if no value is associated with the entry.key()
Key of the read-only entry view.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.functional.EntryView.ReadEntryView
peek
-
Constructor Details
-
NoValueReadOnlyView
-
-
Method Details
-
key
Description copied from interface:EntryView.ReadEntryView
Key of the read-only entry view. Guaranteed to return a non-null value. The instance of the key must not be mutated.- Specified by:
key
in interfaceEntryView.ReadEntryView<K,
V>
-
get
Description copied from interface:EntryView.ReadEntryView
Returns a non-null value if the key has a value associated with it or throwsNoSuchElementException
if no value is associated with the entry.The value instance is read-only and must not be mutated. If the function accessing this value is about to update the entry, it has to create a defensive copy (or completely new instance) and store it using
EntryView.WriteEntryView.set(Object, MetaParam.Writable[])
.- Specified by:
get
in interfaceEntryView.ReadEntryView<K,
V> - Throws:
NoSuchElementException
- if no value is associated with the key.
-
find
Description copied from interface:EntryView.ReadEntryView
Optional value. It'll return a non-empty value when the value is present, and empty when the value is not present.The value instance is read-only and must not be mutated. If the function accessing this value is about to update the entry, it has to create a defensive copy (or completely new instance) and store it using
EntryView.WriteEntryView.set(Object, MetaParam.Writable[])
.- Specified by:
find
in interfaceEntryView.ReadEntryView<K,
V>
-
findMetaParam
Description copied from interface:MetaParam.Lookup
Returns a non-emptyOptional
instance containing a metadata parameter instance that can be assigned to the typeClass
passed in, or an emptyOptional
if no metadata can be assigned to that type.- Specified by:
findMetaParam
in interfaceMetaParam.Lookup
- Type Parameters:
T
- metadata parameter type
-
toString
-