/** * Returns the boolean information whether this assertion contains any parameters. * * @return {@code true} if the assertion contains parameters. Returns {@code false} otherwise. */ public final boolean hasParameters() { return !parameters.isEmpty(); }
/** * Returns the boolean information whether this assertion contains any parameters. * * @return {@code true} if the assertion contains parameters. Returns {@code false} otherwise. * * @deprecated Use hasParameters() instead */ @Deprecated public final boolean hasNestedAssertions() { // TODO: remove return !parameters.isEmpty(); }
/** * Returns {@code true} if the policy instance represents "anything allowed" policy expression * * @return {@code true} if the policy instance represents "anything allowed" policy expression, {@code false} otherwise. */ public boolean isEmpty() { return assertionSets.size() == 1 && assertionSets.get(0).isEmpty(); }
policy = Policy.createNullPolicy(model.getNamespaceVersion(), policyName, policyId); LOGGER.finest(LocalizationMessages.WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED()); } else if (alternatives.size() == 1 && alternatives.iterator().next().isEmpty()) { policy = Policy.createEmptyPolicy(model.getNamespaceVersion(), policyName, policyId); LOGGER.finest(LocalizationMessages.WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED());
AlternativeFitness bestAlternativeFitness = AlternativeFitness.UNEVALUATED; for (AssertionSet alternative : policy) { AlternativeFitness alternativeFitness = (alternative.isEmpty()) ? AlternativeFitness.SUPPORTED_EMPTY : AlternativeFitness.UNEVALUATED; for ( PolicyAssertion assertion : alternative ) {