protected C getDelegate(boolean write) { if (write) { state.assertCanMutate(); } Collection<T> delegate = Cast.uncheckedCast(ScalarCollectionSchema.get(modelNode)); return initialValue(write, delegate); }
@Override public Optional<String> getValueDescription(MutableModelNode modelNodeInternal) { Collection<?> values = ScalarCollectionSchema.get(modelNodeInternal); if (values == null) { return Optional.absent(); } return Optional.of(values.toString()); }