2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.binding;
10 import com.google.common.collect.ImmutableSet;
11 import org.eclipse.jdt.annotation.NonNull;
14 * Interface implemented by all {@link TypeObject}s generated for {@code type bits}.
16 public non-sealed interface BitsTypeObject extends TypeObject {
18 * Return the set of strings which are valid {@code bit} names for this type. The iteration order of the returned
19 * set is required to match effective bit {@code position} assignment.
21 * @return The names of valid bits for this type.
23 @NonNull ImmutableSet<String> validNames();
26 * Return the bit values. Returned array contains all bits from {@link #validNames()} in the interation order of
27 * that set. Note that the array is packed, e.g. unassigned positions are skipped over.
29 * @return Array of values.
31 boolean @NonNull [] values();