Skip to content

Commit

Permalink
Delete kala.annotations.UnstableName
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Jan 5, 2025
1 parent 4146b2f commit fac62bb
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 40 deletions.
24 changes: 0 additions & 24 deletions kala-base/src/main/java/kala/annotations/UnstableName.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
package kala.collection.base;

import kala.annotations.Covariant;
import kala.annotations.UnstableName;

import java.util.Iterator;
import java.util.NoSuchElementException;

public abstract class AbstractIterator<@Covariant E> implements Iterator<E> {

@UnstableName
protected void checkStatus() throws NoSuchElementException {
if (!hasNext()) {
throw new NoSuchElementException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package kala.collection.base;

import kala.annotations.UnstableName;
import kala.control.Option;
import kala.annotations.Covariant;
import kala.annotations.StaticClass;
Expand All @@ -26,6 +25,7 @@
import kala.index.Indexes;
import kala.tuple.Tuple;
import kala.tuple.Tuple2;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -451,7 +451,7 @@ public static <E> int lastIndexWhere(E @NotNull [] array, @NotNull Predicate<? s

//region Misc Operations

@UnstableName
@ApiStatus.Experimental
public static <E> E @NotNull [] copyOrUse(E[] a, int beginIndex, int endIndex) {
return beginIndex == 0 && endIndex == a.length
? a
Expand Down
3 changes: 1 addition & 2 deletions kala-base/src/main/java/kala/collection/base/Sized.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
*/
package kala.collection.base;

import kala.annotations.UnstableName;
import org.jetbrains.annotations.ApiStatus;

@UnstableName
@ApiStatus.Experimental
public interface Sized {

boolean isEmpty();
Expand Down
4 changes: 2 additions & 2 deletions kala-base/src/main/java/kala/control/Either.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package kala.control;

import kala.annotations.Covariant;
import kala.annotations.UnstableName;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -54,7 +54,7 @@ static <A, B> Either.Right<A, B> narrow(Either.Right<? extends A, ? extends B> r
return new Right<>(value);
}

@UnstableName
@ApiStatus.Experimental
static <T> T join(@NotNull Either<? extends T, ? extends T> either) {
if (either.isLeft()) {
return either.getLeftValue();
Expand Down
4 changes: 2 additions & 2 deletions kala-base/src/main/java/kala/value/MutableValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import kala.annotations.DelegateBy;
import kala.annotations.ReplaceWith;
import kala.annotations.UnstableName;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

import java.util.Objects;
Expand Down Expand Up @@ -57,7 +57,7 @@ public non-sealed interface MutableValue<T> extends MutableAnyValue<T>, Value<T>
return new AtomicVar<>(initialValue);
}

@UnstableName
@ApiStatus.Experimental
static <T> @NotNull MutableValue<T> by(@NotNull Supplier<? extends T> getter, @NotNull Consumer<? super T> setter) {
Objects.requireNonNull(getter);
Objects.requireNonNull(setter);
Expand Down
4 changes: 2 additions & 2 deletions kala-base/src/main/java/kala/value/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package kala.value;

import kala.annotations.ReplaceWith;
import kala.annotations.UnstableName;
import kala.collection.base.Iterators;
import kala.collection.base.Mappable;
import kala.collection.base.Traversable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

import java.util.Iterator;
Expand All @@ -34,7 +34,7 @@ public non-sealed interface Value<T> extends AnyValue<T>, Traversable<T>, Mappab
return new DefaultValue<>(value);
}

@UnstableName
@ApiStatus.Experimental
static <T> @NotNull Value<T> by(@NotNull Supplier<? extends T> getter) {
Objects.requireNonNull(getter);
return new DelegateValue<>(getter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
package kala.range.primitive;

import kala.annotations.UnstableName;
import kala.collection.base.primitive.*;
import kala.range.BoundType;
import kala.range.RangeType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Range;

Expand Down Expand Up @@ -145,7 +145,7 @@ public final class ${Type}Range implements IntegralRange<${WrapperType}>, ${Type
:upperBound;
}

@UnstableName
@ApiStatus.Experimental
public ${PrimitiveType} fit(${PrimitiveType} value) {
if (isEmpty()) {
throw new UnsupportedOperationException("Range is empty");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package kala.value.primitive;

import kala.annotations.DelegateBy;
import kala.annotations.ReplaceWith;
import kala.annotations.UnstableName;
import kala.function.*;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

import java.util.Objects;
Expand Down Expand Up @@ -52,7 +52,7 @@ public non-sealed interface Mutable${Type}Value extends MutablePrimitiveValue<${
}

</#if>
@UnstableName
@ApiStatus.Experimental
static @NotNull Mutable${Type}Value by(@NotNull ${Type}Supplier getter, @NotNull ${Type}Consumer setter) {
Objects.requireNonNull(getter);
Objects.requireNonNull(setter);
Expand Down

0 comments on commit fac62bb

Please sign in to comment.