/* * Copyright (c) 2017 Pantheon Technologies, 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.yang.model.api.type; import java.util.Optional; import org.opendaylight.yangtools.yang.model.api.TypeDefinition; /** * Interface for {@link TypeDefinition}s which can have their values restricted to a set of allowed values. * * @param Concrete {@link TypeDefinition} subinterface * @param Native data type */ public interface RangeRestrictedTypeDefinition, N extends Number & Comparable> extends TypeDefinition { /** * Returns range constraint of this type, if applicable. This is the effective constraint, e.g. it includes any * range constraints implied by base type hierarchy. * * @return range constraint which are specified in the range substatement of the type * statement. */ Optional> getRangeConstraint(); }