T - field typepublic final class LazyField<T> extends AbstractField<T>
Field.Builder<T>| Constructor and Description |
|---|
LazyField(Field<?> origin,
java.util.function.Function<DeviceUID,T> mapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(DeviceUID id)
Verifies if some device has an entry in this field.
|
java.util.Optional<T> |
getIfPresent(DeviceUID id) |
DeviceUID |
getLocalDevice() |
java.lang.Iterable<? extends java.util.Map.Entry<DeviceUID,T>> |
iterable() |
java.lang.Iterable<DeviceUID> |
keys() |
java.util.stream.Stream<DeviceUID> |
keyStream() |
int |
size()
The number of neighbors in this field.
|
java.util.stream.Stream<? extends java.util.Map.Entry<DeviceUID,T>> |
stream() |
java.lang.Iterable<T> |
values() |
java.util.stream.Stream<T> |
valueStream() |
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitfoldExcludingLocal, foldExcludingLocal, foldIncludingLocal, foldIncludingLocal, foldKeysExcludingLocal, foldKeysIncludingLocal, foldValuesExcludingLocal, foldValuesIncludingLocal, get, getExpectedType, getLocal, getLocalValue, isEmpty, map, projectOn, reduce, reduce, reduceKeys, reduceValues, toMappublic java.lang.Iterable<? extends java.util.Map.Entry<DeviceUID,T>> iterable()
public java.lang.Iterable<DeviceUID> keys()
Iterable for the field keyspublic java.util.stream.Stream<DeviceUID> keyStream()
Stream for the field keyspublic java.util.stream.Stream<T> valueStream()
Stream over the set of valuespublic java.lang.Iterable<T> values()
Iterable set of valuespublic java.util.stream.Stream<? extends java.util.Map.Entry<DeviceUID,T>> stream()
Stream over the set of neighbor/value pairspublic java.util.Optional<T> getIfPresent(@Nonnull DeviceUID id)
id - the DeviceUIDOptional,
or an Optional.empty() if the device is not aligned.public DeviceUID getLocalDevice()
public boolean containsKey(DeviceUID id)
Fieldid - a device UIDpublic int size()
Field