@Test public void testNonConsensus_visible() { behaviorDispatcher = new BehaviorDependentDispatcher(wrappedDispatcher, PropertyBehaviorProvider.with(PropertyBehavior.visible(() -> false))); assertThat(behaviorDispatcher.pull(Aspect.of(VisibleAspectDefinition.NAME)), is(false)); }
@SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.getName().equals(VisibleAspectDefinition.NAME) && !isConsensus(forBoundObjectAndProperty(PropertyBehavior::isVisible))) { return (T)Boolean.FALSE; } else { return super.pull(aspect); } }
BehaviorDependentDispatcher extends AbstractPropertyDispatcherDecorator { @SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.getName().equals(VisibleAspectDefinition.NAME) && !isConsensus(forBoundObjectAndProperty(PropertyBehavior::isVisible))) { return (T)Boolean.FALSE; } else { return super.pull(aspect); } } }
BehaviorDependentDispatcher extends AbstractPropertyDispatcherDecorator { @SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.getName().equals(VisibleAspectDefinition.NAME) && !isConsensus(forBoundObjectAndProperty(PropertyBehavior::isVisible))) { return (T)Boolean.FALSE; } else { return super.pull(aspect); } } BehaviorDependentDispatcher(PropertyDispatcher wrappedDispatcher,
            PropertyBehaviorProvider provider); }
BehaviorDependentDispatcher extends AbstractPropertyDispatcherDecorator { @SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.getName().equals(VisibleAspectDefinition.NAME) && !isConsensus(forBoundObjectAndProperty(PropertyBehavior::isVisible))) { return (T)Boolean.FALSE; } else { return super.pull(aspect); } } BehaviorDependentDispatcher(PropertyDispatcher wrappedDispatcher,
            PropertyBehaviorProvider provider); @Override MessageList getMessages(MessageList messageList); @SuppressWarnings("unchecked") @Override T pull(Aspect<T> aspect); @Override boolean isPushable(Aspect<T> aspect); }
BehaviorDependentDispatcher extends AbstractPropertyDispatcherDecorator { @SuppressWarnings("unchecked") @Override public <T> T pull(Aspect<T> aspect) { if (aspect.getName().equals(VisibleAspectDefinition.NAME) && !isConsensus(forBoundObjectAndProperty(PropertyBehavior::isVisible))) { return (T)Boolean.FALSE; } else { return super.pull(aspect); } } BehaviorDependentDispatcher(PropertyDispatcher wrappedDispatcher,
            PropertyBehaviorProvider provider); @Override MessageList getMessages(MessageList messageList); @SuppressWarnings("unchecked") @Override T pull(Aspect<T> aspect); @Override boolean isPushable(Aspect<T> aspect);  }