Remove @Beta for sufficiently-stabilized classes.
Change-Id: Ie7bd239affcf1af1449413da9c69da0fc1a46a73
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import java.util.AbstractQueue;
import java.util.Collections;
import java.util.Deque;
* A specialized always-empty implementation of {@link java.util.Deque}. This implementation will always refuse new
* elements in its {@link #offer(Object)} method.
- * @author Robert Varga
- *
* @param <E> the type of elements held in this collection
*/
-@Beta
public final class EmptyDeque<E> extends AbstractQueue<E> implements Deque<E>, Immutable {
private static final EmptyDeque<?> INSTANCE = new EmptyDeque<>();
private static final Object[] EMPTY_ARRAY = new Object[0];
import static com.google.common.base.Verify.verifyNotNull;
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.UnmodifiableIterator;
import java.io.Serial;
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
-@Beta
public abstract sealed class ImmutableOffsetMap<K, V> implements UnmodifiableMapPhase<K, V>, Serializable {
static final class Ordered<K, V> extends ImmutableOffsetMap<K, V> {
@Serial
*/
package org.opendaylight.yangtools.util;
-import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.Mutable;
/**
- * A {@link Map} which can be modified and supports efficient conversion to an
- * unmodifiable map. This interface is the logical counterpart to
- * {@link UnmodifiableMapPhase}, but it does not require implementations of
- * {@link #toUnmodifiableMap()} to return an implementation of that interface.
- * The reason for that empty and singleton mappings are efficiently represented
- * as {@link ImmutableMap}, which does not implement
- * {@link UnmodifiableMapPhase}.
+ * A {@link Map} which can be modified and supports efficient conversion to an unmodifiable map. This interface is the
+ * logical counterpart to {@link UnmodifiableMapPhase}, but it does not require implementations of
+ * {@link #toUnmodifiableMap()} to return an implementation of that interface. The reason for that empty and singleton
+ * mappings are efficiently represented as {@link ImmutableMap}, which does not implement {@link UnmodifiableMapPhase}.
*
- * @param <K>
- * the type of keys maintained by this map
- * @param <V>
- * the type of mapped values
+ * @param <K> the type of keys maintained by this map
+ * @param <V> the type of mapped values
*/
-@Beta
public interface ModifiableMapPhase<K, V> extends Map<K, V>, Mutable {
/**
* Return an isolated unmodifiable version of this map. Returned object must not allow removal, addition or changing
import static com.google.common.base.Verify.verifyNotNull;
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
-@Beta
public abstract class MutableOffsetMap<K, V> extends AbstractMap<K, V> implements Cloneable, ModifiableMapPhase<K, V> {
static final class Ordered<K, V> extends MutableOffsetMap<K, V> {
Ordered() {
objects[verifyNotNull(offsets.get(e.getKey()))] = requireNonNull(e.getValue());
}
- this.needClone = false;
+ needClone = false;
}
/**
import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
-@Beta
public abstract sealed class SharedSingletonMap<K, V> implements Serializable, UnmodifiableMapPhase<K, V> {
static final class Ordered<K, V> extends SharedSingletonMap<K, V> {
@Serial
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.collect.Iterators;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Serial;
* A {@link Set} containing a single value. For some reason neither Java nor Guava provide direct access to the retained
* element -- which is desirable in some situations, as is the case in {@link SharedSingletonMap#entrySet()}.
*/
-@Beta
public abstract sealed class SingletonSet<E> implements Set<E>, Immutable, Serializable {
- @Serial
+ @java.io.Serial
private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
return obj == this || obj instanceof Set<?> other && other.size() == 1 && otherContains(other);
}
- @Serial
+ @java.io.Serial
final Object writeReplace() {
return new SSv1(getElement());
}
import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import java.util.Collection;
import java.util.Collections;
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
-@Beta
public final class UnmodifiableMap<K, V> implements Map<K, V>, Immutable {
private final @NonNull Map<K, V> delegate;
*/
package org.opendaylight.yangtools.util;
-import com.google.common.annotations.Beta;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.Immutable;
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
-@Beta
public interface UnmodifiableMapPhase<K, V> extends Map<K, V>, Immutable {
/**
* Return an isolated modifiable version of this map. Its mappings must match the mappings present in this map. Any