Class Bindings<V,B extends Binding<V,B>>
- Type Parameters:
V- the type of aBinding's attribute valuesB- The concrete subtype of this class
- Direct Known Subclasses:
Qualifiers
- Author:
- Laird Nelson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal booleancontainsUnique(String name) Returnstrueif and only if there is exactly oneBindingcontained by thisBindingswhose name is equal to the suppliedname.final Optional<? extends ConstantDesc>Returns anOptionalhousing aConstantDescdescribing thisBindings, if thisBindingsis capable of being represented as a dynamic constant, or an emptyOptionalif not.protected MethodHandleDescReturns aMethodHandleDescdescribing the constructor orstaticmethod that will be used to create a dynamic constant representing thisBindings.final booleanfinal inthashCode()Returns a hashcode for thisBindings.final intintersectionSize(Iterable<?> other) final booleanisEmpty()Returnstrueif thisBindingsis logically empty.iterator()final intsize()Returns0or a positive integer describing the number of entries contained by thisBindings.final Spliterator<B>stream()final intsymmetricDifferenceSize(Iterable<?> other) toString()final BReturns the soleBindinginstance whose name is equal to the suppliedname, ornullif either there is no suchBindingor there are severalBindings with the suppliedname.final VuniqueValue(String name)
-
Constructor Details
-
Method Details
-
isEmpty
Returnstrueif thisBindingsis logically empty. -
size
Returns0or a positive integer describing the number of entries contained by thisBindings.- Returns:
- the size of this
Bindings - Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
uniqueValue
Returns the soleBindingvalue whose name is equal to the suppliedname, ornullif either there is no suchBindingor there are severalBindings with the suppliedname.- Parameters:
name- the name; may benullin which casefalsewill be returned- Returns:
- the sole
Bindingvalue whose name is equal to the suppliedname, ornullif either there is no suchBindingor there are severalBindings with the suppliedname. - See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method may return
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
unique
Returns the soleBindinginstance whose name is equal to the suppliedname, ornullif either there is no suchBindingor there are severalBindings with the suppliedname.- Parameters:
name- the name; may benullin which casefalsewill be returned- Returns:
- the sole
Bindinginstance whose name is equal to the suppliedname, ornullif either there is no suchBindingor there are severalBindings with the suppliedname. - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method may return
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
contains
Returnstrueif and only if the suppliedObjectis contained by thisBindings.If the
Objectis aBinding, the containment check is performed via an equality check. If theObjectis aString, then this method will returntrueif there is aBindingcontained by thisBindingswhose name is equal to the suppliedString.There may be many
Bindinginstances contained by thisBindingswhose names are equal.- Parameters:
o- theObjectto test;truereturn values are possible only when thisObjectis either aBindingor aString- Returns:
trueif and only if the suppliedObjectis contained by thisBindings- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
containsUnique
Returnstrueif and only if there is exactly oneBindingcontained by thisBindingswhose name is equal to the suppliedname.- Parameters:
name- the name to test; may benullin which casefalsewill be returned- Returns:
trueif and only if there is exactly oneBindingcontained by thisBindingswhose name is equal to the suppliedname- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
stream
-
iterator
- Specified by:
iteratorin interfaceIterable<V>- Returns:
- a non-
null, immutableIteratorofBindinginstances contained by thisBindings - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
spliterator
- Specified by:
spliteratorin interfaceIterable<V>- Returns:
- a non-
null, immutableSpliteratorofBindinginstances contained by thisBindings - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
intersectionSize
-
symmetricDifferenceSize
Returns the size of the symmetric difference between thisBindingsand the suppliedIterable.The number returned is always
0or greater.The size of the symmetric difference between this
Bindingsinstance and the suppliedIterableis the number of entries that are in one of these two objects but not in the other.- Parameters:
other- anIterable; may benullin which case the result of an invocation of thisBindings'size()method will be returned- Returns:
- the size of the symmetric difference between
this
Bindingsand the suppliedIterable; always0or greater - Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
describeConstable
Returns anOptionalhousing aConstantDescdescribing thisBindings, if thisBindingsis capable of being represented as a dynamic constant, or an emptyOptionalif not.- Specified by:
describeConstablein interfaceConstable- Returns:
- an
Optionalhousing aConstantDescdescribing thisBinding, if thisBindingsis capable of being represented as a dynamic constant, or an emptyOptionalif not - See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
describeConstructor
Returns aMethodHandleDescdescribing the constructor orstaticmethod that will be used to create a dynamic constant representing thisBindings.- Returns:
- a
MethodHandleDescdescribing the constructor orstaticmethod that will be used to create a dynamic constant representing thisBindings - Idempotency:
- This method is, and its overrides must be, idempotent and deterministic.
- Nullability:
- This method does not, and its overrides must not,
return
null. - Thread Safety:
- This method is, and its overrides must be, safe for concurrent use by multiple threads.
-
hashCode
Returns a hashcode for thisBindings. -
equals
Returnstrueif and only if thisBindingsis equal to the suppliedObject.The supplied
Objectis considered to be equal to thisBindingsif and only if:- Overrides:
equalsin classObject- Parameters:
other- theObjectto test; may benullin which casefalsewill be returned- Returns:
trueif the suppliedObjectis equal to thisBinding- See Also:
- Idempotency:
- This method is, and its overrides must be, idempotent and deterministic.
- Thread Safety:
- This method is, and its overrides must be, safe for concurrent use by multiple threads.
-
toString
Returns aStringrepresentation of thisBindings.The format of the returned
Stringis deliberately undefined and may change between versions of this class without prior notice.- Overrides:
toStringin classObject- Returns:
- a
Stringrepresentation of thisBindings - Idempotency:
- This method is, and its overrides must be, idempotent and deterministic.
- Nullability:
- This method does not, and its overrides must not,
return
null. - Thread Safety:
- This method is, and its overrides must be, safe for concurrent use by multiple threads.
-