Interface Ranked
In addition, an implementation may be designated as an alternate, which may affect the interpretation of the implementation's rank, usually by conferring a rank that cannot be outranked by any other.
Given a series of Ranked implementations sorted by rank, the first element of the
series will bear the highest, or greatest, rank.
- Author:
- Laird Nelson
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.The default rank (0) when returned by an implementation of therank()method. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDeprecated.default booleanoutranks(int j) Deprecated.Returnstrueif thisRankedbears a rank that outranks the rank represented byjaccording to the rules described in the specification for theoutranks(int, int)method.static booleanoutranks(int i, int j) Deprecated.Returnstrueif and only if a rank represented byioutranks a rank represented byj.default booleanDeprecated.Returnstrueif thisRankedoutranks the suppliedRankedaccording to the rules described in the specification for theoutranks(int, int)method.static booleanDeprecated.default intrank()Deprecated.Returns the rank of thisRankedimplementation.
-
Field Details
-
DEFAULT_RANK
-
-
Method Details
-
rank
Deprecated.Returns the rank of thisRankedimplementation.Implementations of this method may return any integer: positive, zero, or negative.
The default implementation of this method returns the value of the
DEFAULT_RANKfield (0).Overrides of this method must return a determinate value.
- Returns:
- the rank of this
Rankedimplementation - See Also:
-
alternate
Deprecated.Returnstrueif thisRankedis to be considered an alternate, which may have an effect on how the return value of therank()method is interpreted in some situations.The default implementation of this method returns
false.Overrides of this method must be idempotent and return a determinate value.
- Returns:
trueif thisRankedis to be considered an alternate
-
outranks
Deprecated.Returnstrueif thisRankedoutranks the suppliedRankedaccording to the rules described in the specification for theoutranks(int, int)method.Overriding this method, while possible and permitted, is discouraged.
-
outranks
Deprecated.Returnstrueif thisRankedbears a rank that outranks the rank represented byjaccording to the rules described in the specification for theoutranks(int, int)method.Overriding this method, while possible and permitted, is discouraged.
-
outranks
-
outranks
Deprecated.Returnstrueif and only if a rank represented byioutranks a rank represented byj.Given two ranks, i and j, i outranks j if and only if i is greater than (
>) j.- Parameters:
i- anintrepresenting a rankj- anintrepresenting a rank- Returns:
trueif and only ifioutranksj- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-