@Override public MutableMap<K, V> value() { return Maps.mutable.empty(); } }
@Override public MutableMap<K, V> value() { return Maps.mutable.empty(); } }
@Override public MutableMap<T, Integer> toMapOfItemToCount() { return Maps.mutable.empty(); }
@Override public MutableMap<T, Integer> toMapOfItemToCount() { return Maps.mutable.empty(); }
public static <K, V> MutableMap<K, V> mMap() { return Maps.mutable.empty(); }
public static <K, V> MutableMap<K, V> mMap() { return Maps.mutable.empty(); }
@Override public <K2, V2> MutableMap<K2, V2> aggregateBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V, ? extends V2> nonMutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new NonMutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, nonMutatingAggregator)); return map; }
@Override public <K2, V2> MutableMap<K2, V2> aggregateInPlaceBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Procedure2<? super V2, ? super V> mutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new MutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, mutatingAggregator)); return map; }
@Override public <K2, V2> MutableMap<K2, V2> aggregateBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V, ? extends V2> nonMutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new NonMutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, nonMutatingAggregator)); return map; }
@Override public <K, V> MutableMap<K, V> toMap( Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) { MutableMap<K, V> map = Maps.mutable.empty(); this.forEach(new MapCollectProcedure<>(map, keyFunction, valueFunction)); return map; }
@Override public <K, V> MutableMap<K, V> toMap( Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) { MutableMap<K, V> map = Maps.mutable.empty(); this.forEach(new MapCollectProcedure<>(map, keyFunction, valueFunction)); return map; }
@Override public <K2, V2> MutableMap<K2, V2> aggregateInPlaceBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Procedure2<? super V2, ? super V> mutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new MutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, mutatingAggregator)); return map; }
private static void verifyConstraintOn( LongArrayList nodeIds, NodePropertyAccessor nodePropertyAccessor, StoreIndexDescriptor descriptor ) throws IndexEntryConflictException { MutableMap<Value,Long> points = Maps.mutable.empty(); MutableLongIterator iter = nodeIds.longIterator(); try { while ( iter.hasNext() ) { long id = iter.next(); Value value = nodePropertyAccessor.getNodePropertyValue( id, descriptor.schema().getPropertyId() ); Long other = points.getIfAbsentPut( value, id ); if ( other != id ) { throw new IndexEntryConflictException( other, id, value ); } } } catch ( EntityNotFoundException e ) { throw new RuntimeException( "Failed to validate uniqueness constraint", e ); } }
@Override public MutableMap<K, V> value() { return Maps.mutable.empty(); } }
@Override public MutableMap<T, Integer> toMapOfItemToCount() { return Maps.mutable.empty(); }
public static <K, V> MutableMap<K, V> mMap() { return Maps.mutable.empty(); }
@Override public <K2, V2> MutableMap<K2, V2> aggregateInPlaceBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Procedure2<? super V2, ? super V> mutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new MutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, mutatingAggregator)); return map; }
@Override public <K2, V2> MutableMap<K2, V2> aggregateBy( Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V, ? extends V2> nonMutatingAggregator) { MutableMap<K2, V2> map = Maps.mutable.empty(); this.forEach(new NonMutatingAggregationProcedure<>(map, groupBy, zeroValueFactory, nonMutatingAggregator)); return map; }
private ImmutableMap<String, String> getSourceEncodings(ImmutableHierarchicalConfiguration metadataConfig) { MutableList<ImmutableHierarchicalConfiguration> encodingConfigs = ListAdapter.adapt(metadataConfig.immutableChildConfigurationsAt("sourceEncodings")); MutableMap<String, String> encodingsMap = Maps.mutable.empty(); for (ImmutableHierarchicalConfiguration encodingConfig : encodingConfigs) { String fileList = encodingConfig.getString(""); for (String file : fileList.split(",")) { encodingsMap.put(file, encodingConfig.getRootElementName()); } } return encodingsMap.toImmutable(); } }
private ImmutableMap<String, String> getSourceEncodings(ImmutableHierarchicalConfiguration metadataConfig) { MutableList<ImmutableHierarchicalConfiguration> encodingConfigs = ListAdapter.adapt(metadataConfig.immutableChildConfigurationsAt("sourceEncodings")); MutableMap<String, String> encodingsMap = Maps.mutable.empty(); for (ImmutableHierarchicalConfiguration encodingConfig : encodingConfigs) { String fileList = encodingConfig.getString(""); for (String file : fileList.split(",")) { encodingsMap.put(file, encodingConfig.getRootElementName()); } } return encodingsMap.toImmutable(); } }