/** * Returns if the component is stateless or not. It checks the stateless hint if that is false * it returns directly false. If that is still true it checks all its behaviors if they can be * stateless. * * @return whether the component is stateless. */ public final boolean isStateless() { if (!getStatelessHint()) { return false; } final Iterator behaviors = getBehaviors().iterator(); while (behaviors.hasNext()) { IBehavior behavior = (IBehavior)behaviors.next(); if (!behavior.getStatelessHint(this)) { return false; } } return true; }
/** * Returns if the component is stateless or not. It checks the stateless hint if that is false * it returns directly false. If that is still true it checks all its behaviors if they can be * stateless. * * @return whether the component is stateless. */ public final boolean isStateless() { if (!getStatelessHint()) { return false; } for (IBehavior behavior : getBehaviors()) { if (!behavior.getStatelessHint(this)) { return false; } } return true; }