本文整理汇总了Java中org.spongepowered.api.data.value.mutable.MapValue类的典型用法代码示例。如果您正苦于以下问题:Java MapValue类的具体用法?Java MapValue怎么用?Java MapValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MapValue类属于org.spongepowered.api.data.value.mutable包,在下文中一共展示了MapValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeAll
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> removeAll(Iterable<K> keys) {
for (K key : keys) {
getActualValue().remove(checkNotNull(key));
}
return this;
}
示例2: makeMapKeyWithKeyAndValue
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
public static <K, V> Key<MapValue<K, V>> makeMapKeyWithKeyAndValue(TypeToken<K> keyToken, TypeToken<V> valueToken,
DataQuery query, String id, String name) {
final TypeToken<MapValue<K, V>> valueToken0 = new TypeToken<MapValue<K, V>>() {}
.where(new TypeParameter<K>() {}, keyToken)
.where(new TypeParameter<V>() {}, valueToken);
return new LanternKeyBuilder<>().type(valueToken0).query(query).id(id).name(name).build();
}
示例3: constructValue
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
protected MapValue<WarpType, Integer> constructValue(Map<WarpType, Integer> actualValue) {
return new SpongeMapValue<>(ThaumicKeys.PLAYER_WARP, actualValue);
}
示例4: warp
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<WarpType, Integer> warp() {
return getValueGetter();
}
示例5: asMutable
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> asMutable() {
return new LanternMapValue<>(getKey(), getDefault(), getActualValue());
}
示例6: transform
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> transform(Function<Map<K, V>, Map<K, V>> function) {
this.actualValue = new HashMap<>(checkNotNull(checkNotNull(function).apply(this.actualValue)));
return this;
}
示例7: put
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> put(K key, V value) {
getActualValue().put(checkNotNull(key), checkNotNull(value));
return this;
}
示例8: putAll
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> putAll(Map<K, V> map) {
getActualValue().putAll(checkNotNull(map));
return this;
}
示例9: remove
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<K, V> remove(K key) {
getActualValue().remove(checkNotNull(key));
return this;
}
示例10: createMapValue
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public <K, V> MapValue<K, V> createMapValue(Key<MapValue<K, V>> key, Map<K, V> map) {
return new LanternMapValue<>(checkNotNull(key, "key"), checkNotNull(map, "map"));
}
示例11: AbstractImmutableMappedData
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
protected AbstractImmutableMappedData(Class<I> immutableManipulatorType, Class<M> manipulatorType, Key<MapValue<K, V>> mapKey) {
this(immutableManipulatorType, manipulatorType, mapKey, ImmutableMap.of());
}
示例12: getMapKey
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public Key<? extends MapValue<K, V>> getMapKey() {
return this.mapKey;
}
示例13: partRotation
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
default MapValue<BodyPart, Vector3d> partRotation() {
return tryGetValueFor(Keys.BODY_ROTATIONS);
}
示例14: fluids
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
public MapValue<Direction, List<FluidStackSnapshot>> fluids() {
return getMapValue();
}
示例15: wireAttachments
import org.spongepowered.api.data.value.mutable.MapValue; //导入依赖的package包/类
@Override
default MapValue<Direction, WireAttachmentType> wireAttachments() {
return tryGetValueFor(Keys.WIRE_ATTACHMENTS);
}