@Test public void construct_from_copy() { Context<?> parent = new SimpleContext<>(ts_data, alert_manager); MutableContext<?> ctx = new MutableContext<>(parent); assertSame(alert_manager, ctx.getAlertManager()); assertSame(ts_data, ctx.getTSData()); assertTrue(ctx.getAllIdentifiers().isEmpty()); assertEquals(Optional.empty(), ctx.getAliasFromIdentifier(String.class, "s")); }
@Override public Map<String, ContextIdentifier> getAllIdentifiers() { return unmodifiableMap(all_identifiers_); }
MutableContext extends SimpleContext<TSDataPair> { @Override public Map<String, ContextIdentifier> getAllIdentifiers() { return unmodifiableMap(all_identifiers_); } }
MutableContext extends SimpleContext<TSDataPair> { @Override public Map<String, ContextIdentifier> getAllIdentifiers() { return unmodifiableMap(all_identifiers_); } MutableContext(TSDataPair ts_data, Consumer<Alert> alert_manager);  MutableContext(Context<? extends TSDataPair> copy);  MutableContext(TSDataPair ts_data, Context copy); }
MutableContext extends SimpleContext<TSDataPair> { @Override public Map<String, ContextIdentifier> getAllIdentifiers() { return unmodifiableMap(all_identifiers_); } 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> { @Override public Map<String, ContextIdentifier> getAllIdentifiers() { return unmodifiableMap(all_identifiers_); } 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();  }