Package io.vavr.collection
Class JavaConverters.HasDelegate<C extends Traversable<?>>
- java.lang.Object
-
- io.vavr.collection.JavaConverters.HasDelegate<C>
-
- Type Parameters:
C
- The Vavr collection type
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
JavaConverters.ListView
- Enclosing class:
- JavaConverters
private abstract static class JavaConverters.HasDelegate<C extends Traversable<?>> extends java.lang.Object implements java.io.Serializable
Encapsulates the access to delegate and performs mutability checks.
-
-
Field Summary
Fields Modifier and Type Field Description private C
delegate
private boolean
mutable
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description HasDelegate(C delegate, boolean mutable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
ensureMutable()
(package private) C
getDelegate()
protected boolean
isMutable()
protected void
setDelegate(java.util.function.Supplier<C> newDelegate)
protected boolean
setDelegateAndCheckChanged(java.util.function.Supplier<C> delegate)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
delegate
private C extends Traversable<?> delegate
-
mutable
private final boolean mutable
-
-
Constructor Detail
-
HasDelegate
HasDelegate(C delegate, boolean mutable)
-
-
Method Detail
-
isMutable
protected boolean isMutable()
-
getDelegate
C getDelegate()
-
setDelegateAndCheckChanged
protected boolean setDelegateAndCheckChanged(java.util.function.Supplier<C> delegate)
-
setDelegate
protected void setDelegate(java.util.function.Supplier<C> newDelegate)
-
ensureMutable
protected void ensureMutable()
-
-