1 | protected boolean isContainer()↵ | | 1 | protected boolean isContainer()↵
|
2 | {↵ | | 2 | {↵
|
3 | return (kind & IS_CONTAINER) != 0;↵ | | 3 | return (kind & IS_CONTAINER) != 0;↵
|
4 | }↵ | | 4 | }↵
|
|
5 | protected boolean isUnsettable()↵ | | 5 | protected boolean isUnsettable()↵
|
6 | {↵ | | 6 | {↵
|
7 | return (kind & IS_UNSETTABLE) != 0;↵ | | 7 | return (kind & IS_UNSETTABLE) != 0;↵
|
8 | }↵ | | 8 | }↵
|
|
9 | @Override↵ | | 9 | @Override↵
|
10 | public boolean isSet()↵ | | 10 | public boolean isSet()↵
|
11 | {↵ | | 11 | {↵
|
12 | return isUnsettable() ? (kind & IS_SET) != 0 : !isEmpty();↵ | | 12 | return isUnsettable() ? (kind & IS_SET) != 0 : !isEmpty();↵
|
13 | }↵ | | 13 | }↵
|
|
14 | @Override↵ | | 14 | @Override↵
|
15 | public void unset()↵ | | 15 | public void unset()↵
|
16 | {↵ | | 16 | {↵
|
17 | super.unset();↵ | | 17 | super.unset();↵
|
18 | if (isUnsettable())↵ | | 18 | if (isUnsettable())↵
|
19 | {↵ | | 19 | {↵
|
20 | if (isNotificationRequired())↵ | | 20 | if (isNotificationRequired())↵
|
21 | {↵ | | 21 | {↵
|
22 | boolean oldIsSet = (kind & IS_SET) != 0;↵ | | 22 | boolean oldIsSet = (kind & IS_SET) != 0;↵
|
23 | kind &= ~IS_SET;↵ | | 23 | kind &= ~IS_SET;↵
|
24 | dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));↵ | | 24 | dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));↵
|
25 | }↵ | | 25 | }↵
|
26 | else↵ | | 26 | else↵
|
27 | {↵ | | 27 | {↵
|
28 | kind &= ~IS_SET;↵ | | 28 | kind &= ~IS_SET;↵
|
29 | }↵ | | 29 | }↵
|
30 | }↵ | | 30 | }↵
|
31 | }↵ | | 31 | }↵
|
|
32 | @Override↵ | | 32 | @Override↵
|
33 | protected void didChange()↵ | | 33 | protected void didChange()↵
|
34 | {↵ | | 34 | {↵
|
35 | kind |= IS_SET; | | 35 | kind |= IS_SET;
|