@FunctionalInterface public interface Prioritized
A Prioritized with lower priority number is more significant than a Prioritized with a
higher priority number.
For cases where priority is the same, implementation must define ordering of such Prioritized.
Negative priorities are not allowed and services using priorities should throw an
IllegalArgumentException if such a priority is used (unless such a service
documents the specific usage of a negative priority)
A Prioritized with priority 1 is more significant (will be returned before) priority 2.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRIORITY
Default priority for any prioritized component (whether it implements this interface
or uses
javax.annotation.Priority annotation. |
| Modifier and Type | Method and Description |
|---|---|
int |
priority()
Priority of this class (maybe because it is defined
dynamically, so it cannot be defined by an annotation).
|
static final int DEFAULT_PRIORITY
javax.annotation.Priority annotation.int priority()
javax.annotation.Priority
annotation rather then implementing this interface as long as
it is supported by the library using this Prioritized.Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.