org.opendaylight.yangtools.binding.impl.DataObjectIdentifierBuilderWithKey Maven / Gradle / Ivy
/*
* Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.binding.impl;
import org.opendaylight.yangtools.binding.DataObject;
import org.opendaylight.yangtools.binding.DataObjectIdentifier;
import org.opendaylight.yangtools.binding.DataObjectIdentifier.Builder.WithKey;
import org.opendaylight.yangtools.binding.DataObjectStep;
import org.opendaylight.yangtools.binding.EntryObject;
import org.opendaylight.yangtools.binding.Key;
import org.opendaylight.yangtools.binding.KeyStep;
public final class DataObjectIdentifierBuilderWithKey, K extends Key>
extends AbstractDataObjectIdentifierBuilder implements WithKey {
DataObjectIdentifierBuilderWithKey(final DataObjectIdentifierBuilder> prev) {
super(prev);
}
DataObjectIdentifierBuilderWithKey(final DataObjectIdentifier.WithKey base) {
super(base);
}
public DataObjectIdentifierBuilderWithKey(final KeyStep item) {
super(item);
}
@Override
public DataObjectIdentifier.WithKey build() {
return new DataObjectIdentifierWithKey<>(null, buildSteps());
}
@Override
protected DataObjectIdentifierBuilder append(final DataObjectStep step) {
return new DataObjectIdentifierBuilder(this).append(step);
}
@Override
@SuppressWarnings("unchecked")
protected , Y extends Key> DataObjectIdentifierBuilderWithKey append(
final KeyStep step) {
appendItem(step);
return (DataObjectIdentifierBuilderWithKey) this;
}
}