@Test public void remove() { MutableContext<?> ctx = new MutableContext<>(ts_data, alert_manager); ctx.put("identifier", String.class, Optional.empty(), ALIAS); assertThat(ctx.getAllIdentifiers(), hasKey("identifier")); ctx.remove("identifier"); assertEquals(Optional.empty(), ctx.getFromIdentifier(String.class, "identifier")); assertEquals(Optional.empty(), ctx.getFromIdentifier(CharSequence.class, "identifier")); assertEquals(Optional.empty(), ctx.getFromIdentifier(Float.class, "identifier")); assertEquals(Optional.empty(), ctx.getAliasFromIdentifier(String.class, "identifier")); assertEquals(Optional.empty(), ctx.getAliasFromIdentifier(CharSequence.class, "identifier")); assertEquals(Optional.empty(), ctx.getAliasFromIdentifier(Float.class, "identifier")); }
public void remove(String identifier) { all_identifiers_.remove(identifier); }
MutableContext extends SimpleContext<TSDataPair> { public void remove(String identifier) { all_identifiers_.remove(identifier); } }
MutableContext extends SimpleContext<TSDataPair> { public void remove(String identifier) { all_identifiers_.remove(identifier); } MutableContext(TSDataPair ts_data, Consumer<Alert> alert_manager);  MutableContext(Context<? extends TSDataPair> copy);  MutableContext(TSDataPair ts_data, Context copy); }
MutableContext extends SimpleContext<TSDataPair> { public void remove(String identifier) { all_identifiers_.remove(identifier); } MutableContext(TSDataPair ts_data, Consumer<Alert> alert_manager);  MutableContext(Context<? extends TSDataPair> copy);  MutableContext(TSDataPair ts_data, Context copy); void put(String identifier, Class<T> type, T value, U alias); void put(String identifier, Class<T> type, Optional<T> value, U alias); void putSupplied(String identifier, Class<T> type, Function<Context, Optional<? extends T>> function, Supplier<U> alias); void putGroupAlias(String identifier, Optional<SimpleGroupPath> group); void putGroupAlias(String identifier, SimpleGroupPath group); void putGroupAliasByName(String identifier, Supplier<GroupName> group); void putMetricAliasByName(String identifier, Supplier<GroupName> group, Supplier<MetricName> metric); void remove(String identifier); @Override Map<String, ContextIdentifier> getAllIdentifiers(); }
MutableContext extends SimpleContext<TSDataPair> { public void remove(String identifier) { all_identifiers_.remove(identifier); } MutableContext(TSDataPair ts_data, Consumer<Alert> alert_manager);  MutableContext(Context<? extends TSDataPair> copy);  MutableContext(TSDataPair ts_data, Context copy); void put(String identifier, Class<T> type, T value, U alias); void put(String identifier, Class<T> type, Optional<T> value, U alias); void putSupplied(String identifier, Class<T> type, Function<Context, Optional<? extends T>> function, Supplier<U> alias); void putGroupAlias(String identifier, Optional<SimpleGroupPath> group); void putGroupAlias(String identifier, SimpleGroupPath group); void putGroupAliasByName(String identifier, Supplier<GroupName> group); void putMetricAliasByName(String identifier, Supplier<GroupName> group, Supplier<MetricName> metric); void remove(String identifier); @Override Map<String, ContextIdentifier> getAllIdentifiers();  }