提交 17892a8a 编写于 作者: C Chris Beams

Introduce Ordered#NOT_ORDERED

To provide a reasonable default value for annotations that expose
int-returning #order attributes.
上级 7b999c67
...@@ -47,6 +47,14 @@ public interface Ordered { ...@@ -47,6 +47,14 @@ public interface Ordered {
*/ */
int LOWEST_PRECEDENCE = Integer.MAX_VALUE; int LOWEST_PRECEDENCE = Integer.MAX_VALUE;
/**
* A reserved integer value indicating that a component should
* be treated as unordered. Users should avoid this using this
* reserved value ({@value}) when ordering their own components.
* Useful when populating annotation, where null cannot be specified
* as a default for integer attributes.
*/
int NOT_ORDERED = (Integer.MIN_VALUE +1) / 2; // -1073741823
/** /**
* Return the order value of this object, with a * Return the order value of this object, with a
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册