0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00

NF: withChildren takes @NonNull

This will allow #10148 to migrate to Kotlin with all of the override methods
noted as not null
This commit is contained in:
Arthur Milchior 2022-01-11 14:21:18 +01:00 committed by Mike Hardy
parent 3e2cb3cb4c
commit 93a94e5634
3 changed files with 5 additions and 3 deletions

View File

@ -208,5 +208,5 @@ public abstract class AbstractDeckTreeNode<T extends AbstractDeckTreeNode<T>> im
}
public abstract T withChildren(List<T> children);
public abstract T withChildren(@NonNull List<T> children);
}

View File

@ -141,7 +141,7 @@ public class DeckDueTreeNode extends AbstractDeckTreeNode<DeckDueTreeNode> {
@Override
public DeckDueTreeNode withChildren(List<DeckDueTreeNode> children) {
public DeckDueTreeNode withChildren(@NonNull List<DeckDueTreeNode> children) {
Collection col = getCol();
String name = getFullDeckName();
long did = getDid();

View File

@ -20,6 +20,8 @@ import com.ichi2.libanki.Collection;
import java.util.List;
import androidx.annotation.NonNull;
public class DeckTreeNode extends AbstractDeckTreeNode<DeckTreeNode> {
public DeckTreeNode(Collection col, String name, long did) {
super(col, name, did);
@ -27,7 +29,7 @@ public class DeckTreeNode extends AbstractDeckTreeNode<DeckTreeNode> {
@Override
public DeckTreeNode withChildren(List<DeckTreeNode> children) {
public DeckTreeNode withChildren(@NonNull List<DeckTreeNode> children) {
Collection col = getCol();
String name = getFullDeckName();
long did = getDid();