import java.util.List;
import java.util.Objects;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
/**
- * Makes is possible to access to the individual enumeration values of this
- * type.
+ * Makes is possible to access to the individual enumeration values of this type.
*/
public interface EnumTypeDefinition extends TypeDefinition<EnumTypeDefinition> {
/**
- * Contains the methods for accessing the data about the concrete
- * enumeration item which represents <code>enum</code> YANG type.
+ * Contains the methods for accessing the data about the concrete enumeration item which represents {@code enum}
+ * YANG type.
*/
interface EnumPair extends DocumentedNode.WithStatus {
/**
String getName();
/**
- * The "value" statement, which is optional, is used to associate an
- * integer value with the assigned name for the enum. This integer value
- * MUST be unique within the enumeration type.
+ * The "value" statement, which is optional, is used to associate an integer value with the assigned name
+ * for the enum. This integer value MUST be unique within the enumeration type.
*
* @return integer value assigned to enumeration
*/
/**
* Returns all enumeration values.
*
- * @return list of <code>EnumPair</code> type instastances which contain the
- * data about all individual enumeration pairs of
- * <code>enumeration</code> YANG built-in type
+ * @return list of {@code EnumPair} type instances which contain the data about all individual enumeration pairs
+ * of {@code enumeration} YANG built-in type
*/
- @Nonnull List<EnumPair> getValues();
+ @NonNull List<EnumPair> getValues();
static boolean equals(final EnumTypeDefinition type, final Object obj) {
if (type == obj) {
import com.google.common.collect.ImmutableList;
import java.util.Collection;
import java.util.List;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
final class BaseEnumerationType extends AbstractBaseType<EnumTypeDefinition> implements EnumTypeDefinition {
- private final List<EnumPair> values;
+ private final @NonNull List<EnumPair> values;
BaseEnumerationType(final SchemaPath path, final List<UnknownSchemaNode> unknownSchemaNodes,
final Collection<EnumPair> values) {
this.values = ImmutableList.copyOf(values);
}
- @Nonnull
@Override
public List<EnumPair> getValues() {
return values;
import java.util.Collection;
import java.util.List;
-import javax.annotation.Nonnull;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.Status;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
super(baseType, path, defaultValue, description, reference, status, units, unknownSchemNodes);
}
- @Nonnull
@Override
public List<EnumPair> getValues() {
return baseType().getValues();
import com.google.common.collect.ImmutableList;
import java.util.Collection;
import java.util.List;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
final class RestrictedEnumerationType extends AbstractRestrictedType<EnumTypeDefinition> implements EnumTypeDefinition {
- private final List<EnumPair> values;
+ private final @NonNull List<EnumPair> values;
RestrictedEnumerationType(final EnumTypeDefinition baseType, final SchemaPath path,
final Collection<UnknownSchemaNode> unknownSchemaNodes, final Collection<EnumPair> values) {
this.values = ImmutableList.copyOf(Preconditions.checkNotNull(values));
}
- @Nonnull
@Override
public List<EnumPair> getValues() {
return values;