import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.concepts.Mutable;
-public class Immutables {
+public final class Immutables {
private Immutables() {
throw new UnsupportedOperationException("Helper class");
public static final Set<Class<?>> KNOWN_IMMUTABLES = Immutables.<Class<?>> asHashSet(
//
Integer.class, Short.class, BigDecimal.class, BigInteger.class, Byte.class, Character.class, Double.class,
- Float.class);
+ Float.class, String.class);
/**
* Determines if object is known to be immutable
* Reference to check
* @return true if object is known to be immutable false otherwise.
*/
- public static boolean isImmutable(Object o) {
+ public static boolean isImmutable(final Object o) {
if (o == null) {
throw new IllegalArgumentException("Object should not be null");
}
}
@SafeVarargs
- private static <E> Set<E> asHashSet(E... list) {
+ private static <E> Set<E> asHashSet(final E... list) {
HashSet<E> ret = new HashSet<>();
for (E e : list) {
ret.add(e);
/*
-* Copyright (c) 2014 Brocade Communications Systems, Inc. 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
-*/
+ * Copyright (c) 2014 Brocade Communications Systems, Inc. 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.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.DatastoreIdentifier;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.DatastoreIdentifier.Enumeration;
/**
-**/
+ **/
public class DatastoreIdentifierBuilder {
- public static DatastoreIdentifier getDefaultInstance(String defaultValue) {
- throw new UnsupportedOperationException("Not yet implemented");
+ public static DatastoreIdentifier getDefaultInstance(final String defaultValue) {
+ return new DatastoreIdentifier(Enumeration.valueOf(defaultValue));
}
}