@ParametersAreNonnullByDefault public interface ManyValueWithLists extends ManyValueMapper
ManyValueMapper that provides a default behavior to represent the "multi-valued" characteristic as Lists. The implementation used is specified by the getOrCreateList(SingleFeatureBean) method.
 
 Using a List-based implementation allows to benefit from the rich Java Collection API, with
 the cost of a small memory overhead compared to raw arrays.
| Modifier and Type | Method and Description | 
|---|---|
| default <V> void | addAllValues(ManyFeatureBean feature,
            List<? extends V> collection)Adds all the  collectionto the specifiedfeaturefrom the position of thefeature. | 
| default <V> void | addValue(ManyFeatureBean feature,
        V value)Adds the  valueto the specifiedfeatureat a defined position. | 
| default <V> Stream<V> | allValuesOf(SingleFeatureBean feature)Retrieves all values of the specified  feature. | 
| default <V> List<V> | getOrCreateList(SingleFeatureBean feature)Gets or creates a new  Listto store the multi-valued features identified by thefeature. | 
| default void | removeAllValues(SingleFeatureBean feature)Removes all values of the specified  feature. | 
| default <V> Optional<V> | removeValue(ManyFeatureBean feature)Removes the value of the specified  featureat a defined position. | 
| default Optional<Integer> | sizeOfValue(SingleFeatureBean feature)Returns the number of value of the specified  feature. | 
| default <V> Optional<V> | valueFor(ManyFeatureBean feature,
        V value)Defines the  valueof the specifiedfeatureat a defined position. | 
| default <V> Optional<V> | valueOf(ManyFeatureBean feature)Retrieves the value of the specified  featureat a defined position. | 
appendAllValues, appendValueremoveValue, valueFor, valueOf@Nonnull default <V> Optional<V> valueOf(ManyFeatureBean feature)
ManyValueMapperfeature at a defined position.valueOf in interface ManyValueMapperfeature - the bean identifying the multi-valued attributeOptional containing the value, or Optional.empty() if the feature hasn't any value or
 doesn't exist@Nonnull default <V> Stream<V> allValuesOf(SingleFeatureBean feature)
ManyValueMapperfeature.allValuesOf in interface ManyValueMapperfeature - the bean identifying the multi-valued attributeStream over all values@Nonnull default <V> Optional<V> valueFor(ManyFeatureBean feature, V value)
ManyValueMappervalue of the specified feature at a defined position.valueFor in interface ManyValueMapperV - the type of valuefeature - the bean identifying the multi-valued attributevalue - the value to setOptional containing the previous value of the feature, or Optional.empty() if
 the feature has no value beforeManyValueMapper.addValue(ManyFeatureBean, Object), 
ManyValueMapper.appendValue(SingleFeatureBean, Object)default <V> void addValue(ManyFeatureBean feature, V value)
ManyValueMappervalue to the specified feature at a defined position.addValue in interface ManyValueMapperV - the type of valuefeature - the bean identifying the multi-valued attributevalue - the value to adddefault <V> void addAllValues(ManyFeatureBean feature, List<? extends V> collection)
ManyValueMappercollection to the specified feature from the position of the feature.addAllValues in interface ManyValueMapperV - the type of valuefeature - the bean identifying the multi-valued attributecollection - the values to add@Nonnull default <V> Optional<V> removeValue(ManyFeatureBean feature)
ManyValueMapperfeature at a defined position.removeValue in interface ManyValueMapperV - the type of valuefeature - the bean identifying the multi-valued attributeOptional containing the removed value, or Optional.empty() if the feature has no value
 beforedefault void removeAllValues(SingleFeatureBean feature)
ManyValueMapperfeature.removeAllValues in interface ManyValueMapperfeature - the bean identifying the multi-valued attribute@Nonnull default Optional<Integer> sizeOfValue(SingleFeatureBean feature)
ManyValueMapperfeature.sizeOfValue in interface ManyValueMapperfeature - the bean identifying the multi-valued attributeOptional containing the number of value of the feature, or Optional.empty() if
 the feature hasn't any value, or if size == 0.default <V> List<V> getOrCreateList(SingleFeatureBean feature)
List to store the multi-valued features identified by the feature.
 
 By default, this method creates an ArrayList which favor random read access method, to the detriment of
 insertions and deletions.
V - the type of elements in this listfeature - the bean identifying the multi-valued attributeListCopyright © 2013–2019 Atlanmod. All rights reserved.