import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.concepts.HierarchicalIdentifier;
import org.opendaylight.yangtools.util.HashCodeBuilder;
* contains a null element.
*/
public static @NonNull InstanceIdentifier<?> create(final Iterable<? extends PathArgument> pathArguments) {
- if (pathArguments instanceof ImmutableCollection<?>) {
+ if (pathArguments instanceof ImmutableCollection) {
@SuppressWarnings("unchecked")
- final Iterable<PathArgument> immutableArguments = (Iterable<PathArgument>) pathArguments;
+ final var immutableArguments = (ImmutableCollection<PathArgument>) pathArguments;
return internalCreate(immutableArguments);
}
}
}
- public interface InstanceIdentifierBuilder<T extends DataObject> extends Builder<InstanceIdentifier<T>> {
+ public interface InstanceIdentifierBuilder<T extends DataObject> {
/**
* Append the specified container as a child of the current InstanceIdentifier referenced by the builder. This
* method should be used when you want to build an instance identifier by appending top-level elements, for
*
* @return Resulting instance identifier.
*/
- @Override
- InstanceIdentifier<T> build();
+ @NonNull InstanceIdentifier<T> build();
}
private Object writeReplace() throws ObjectStreamException {