2 * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.javav2.java.api.generator.range_generators;
10 import com.google.common.primitives.UnsignedLong;
11 import java.math.BigInteger;
12 import org.opendaylight.yangtools.yang.common.Uint64;
14 final class Uint64RangeGenerator extends AbstractUnsignedIntegerRangeGenerator<Uint64> {
15 Uint64RangeGenerator() {
16 super(Uint64.class, Uint64.class.getName(), Uint64.valueOf(0), Uint64.fromUnsignedLong(
17 UnsignedLong.fromLongBits(0xffffffffffffffffL)));
21 protected Uint64 convert(final Number value) {
22 return Uint64.valueOf(BigInteger.class.cast(value));