2525
2626import java .util .Set ;
2727import org .jetbrains .annotations .ApiStatus ;
28- import org .jetbrains .annotations .NotNull ;
29- import org .jetbrains .annotations .Nullable ;
28+ import org .jspecify .annotations .Nullable ;
3029
3130import static java .util .Objects .requireNonNull ;
3231
@@ -45,7 +44,7 @@ public interface OptionSchema {
4544 * @return the global schema
4645 * @since 1.1.0
4746 */
48- static OptionSchema .@ NotNull Mutable globalSchema () {
47+ static OptionSchema .Mutable globalSchema () {
4948 return OptionSchemaImpl .Instances .GLOBAL ;
5049 }
5150
@@ -58,7 +57,7 @@ public interface OptionSchema {
5857 * @return the mutable child schema
5958 * @since 1.1.0
6059 */
61- static OptionSchema .@ NotNull Mutable childSchema (final @ NotNull OptionSchema schema ) {
60+ static OptionSchema .Mutable childSchema (final OptionSchema schema ) {
6261 final OptionSchemaImpl impl ;
6362 if (schema instanceof OptionSchemaImpl .MutableImpl ) {
6463 impl = (OptionSchemaImpl ) ((Mutable ) schema ).frozenView ();
@@ -76,7 +75,7 @@ public interface OptionSchema {
7675 * @return a mutable schema
7776 * @since 1.1.0
7877 */
79- static OptionSchema .@ NotNull Mutable emptySchema () {
78+ static OptionSchema .Mutable emptySchema () {
8079 return new OptionSchemaImpl (null ).new MutableImpl ();
8180 }
8281
@@ -86,7 +85,7 @@ public interface OptionSchema {
8685 * @return known options
8786 * @since 1.1.0
8887 */
89- @ NotNull Set <Option <?>> knownOptions ();
88+ Set <Option <?>> knownOptions ();
9089
9190 /**
9291 * Return whether the provided option is known within this scheam.
@@ -95,23 +94,23 @@ public interface OptionSchema {
9594 * @return whether the option is known
9695 * @since 1.1.0
9796 */
98- boolean has (final @ NotNull Option <?> option );
97+ boolean has (final Option <?> option );
9998
10099 /**
101100 * Create a builder for an unversioned option state containing only options within this schema.
102101 *
103102 * @return the builder
104103 * @since 1.1.0
105104 */
106- OptionState .@ NotNull Builder stateBuilder ();
105+ OptionState .Builder stateBuilder ();
107106
108107 /**
109108 * Create a builder for a versioned option state containing only values for options within this schema.
110109 *
111110 * @return the builder
112111 * @since 1.1.0
113112 */
114- OptionState .@ NotNull VersionedBuilder versionedStateBuilder ();
113+ OptionState .VersionedBuilder versionedStateBuilder ();
115114
116115 /**
117116 * Create an empty option state within this schema.
@@ -138,7 +137,7 @@ interface Mutable extends OptionSchema {
138137 * @return the flag instance
139138 * @since 1.1.0
140139 */
141- @ NotNull Option <String > stringOption (final @ NotNull String id , final @ Nullable String defaultValue );
140+ Option <String > stringOption (final String id , final @ Nullable String defaultValue );
142141
143142 /**
144143 * Create an option with a boolean value type.
@@ -150,7 +149,7 @@ interface Mutable extends OptionSchema {
150149 * @return the flag instance
151150 * @since 1.1.0
152151 */
153- @ NotNull Option <Boolean > booleanOption (final @ NotNull String id , final boolean defaultValue );
152+ Option <Boolean > booleanOption (final String id , final boolean defaultValue );
154153
155154 /**
156155 * Create an option with an integer value type.
@@ -162,7 +161,7 @@ interface Mutable extends OptionSchema {
162161 * @return the flag instance
163162 * @since 1.1.0
164163 */
165- @ NotNull Option <Integer > intOption (final @ NotNull String id , final int defaultValue );
164+ Option <Integer > intOption (final String id , final int defaultValue );
166165
167166 /**
168167 * Create an option with a double value type.
@@ -174,7 +173,7 @@ interface Mutable extends OptionSchema {
174173 * @return the flag instance
175174 * @since 1.1.0
176175 */
177- @ NotNull Option <Double > doubleOption (final @ NotNull String id , final double defaultValue );
176+ Option <Double > doubleOption (final String id , final double defaultValue );
178177
179178 /**
180179 * Create an option with an enum value type.
@@ -188,7 +187,7 @@ interface Mutable extends OptionSchema {
188187 * @return the flag instance
189188 * @since 1.1.0
190189 */
191- <E extends Enum <E >> @ NotNull Option <E > enumOption (final @ NotNull String id , final @ NotNull Class <E > enumClazz , final @ Nullable E defaultValue );
190+ <E extends Enum <E >> Option <E > enumOption (final String id , final Class <E > enumClazz , final @ Nullable E defaultValue );
192191
193192 /**
194193 * Return a view of this schema which does not allow consumers to register new options.
@@ -198,6 +197,6 @@ interface Mutable extends OptionSchema {
198197 * @return the frozen view of this schema
199198 * @since 1.1.0
200199 */
201- @ NotNull OptionSchema frozenView ();
200+ OptionSchema frozenView ();
202201 }
203202}
0 commit comments