Migrate boolean getters
[bgpcep.git] / bgp / parser-spi / src / main / java / org / opendaylight / protocol / bgp / parser / spi / PeerSpecificParserConstraintProvider.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.bgp.parser.spi;
9
10 import org.eclipse.jdt.annotation.NonNull;
11
12 /**
13  * Serve as an entry gate for providers of {@link PeerSpecificParserConstraint} services.
14  *
15  */
16 public interface PeerSpecificParserConstraintProvider extends PeerSpecificParserConstraint {
17
18     /**
19      * Register new {@link PeerConstraint} service.
20      * @param classType Class type of the service to be added.
21      * @param peerConstraint Peer constraint service to be added.
22      * @return True if service was added, false if not (such service is already registered).
23      */
24     <T extends PeerConstraint> boolean addPeerConstraint(@NonNull Class<T> classType, @NonNull T peerConstraint);
25
26 }