import org.opendaylight.yangtools.yang.binding.Augmentable;
import org.opendaylight.yangtools.yang.binding.Augmentation;
public class AugmentationVerifier<T extends Augmentable<T>> {
import org.opendaylight.yangtools.yang.binding.Augmentable;
import org.opendaylight.yangtools.yang.binding.Augmentation;
public class AugmentationVerifier<T extends Augmentable<T>> {
- public static <T extends Augmentable<T>> void assertHasAugmentation(T object,
- Class<? extends Augmentation<T>> augmentation) {
+ public static <T extends Augmentable<T>> void assertHasAugmentation(final T object,
+ final Class<? extends Augmentation<T>> augmentation) {
- assertNotNull("Augmentation " + augmentation.getSimpleName() + " is not present.", object.getAugmentation(augmentation));
+ assertNotNull("Augmentation " + augmentation.getSimpleName() + " is not present.",
+ object.augmentation(augmentation));
- public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
- return new AugmentationVerifier<T>(obj);
+ public static <T extends Augmentable<T>> AugmentationVerifier<T> from(final T obj) {
+ return new AugmentationVerifier<>(obj);