1 package org.opendaylight.controller.sal.common.util;
3 public class Arguments {
6 throw new UnsupportedOperationException("Utility class");
10 * Checks if value is instance of provided class
13 * @param value Value to check
14 * @param type Type to check
15 * @return Reference which was checked
17 @SuppressWarnings("unchecked")
18 public static <T> T checkInstanceOf(Object value, Class<T> type) {
19 if(!type.isInstance(value))
20 throw new IllegalArgumentException();