c086beb007bde34f39db7b86c4563659decb668a
[netconf.git] / netconf / models / ietf-netconf-acm / src / main / java / org / opendaylight / yang / gen / v1 / urn / ietf / params / xml / ns / yang / ietf / netconf / acm / rev180214 / nacm / rule / list / rule / rule / type / ProtocolOperationRpcNameBuilder.java
1 /*
2  * Copyright (c) 2019 PATHEON.tech, s.r.o. 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.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.acm.rev180214.nacm.rule.list.rule.rule.type;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.acm.rev180214.MatchallStringType;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.acm.rev180214.nacm.rule.list.rule.rule.type.ProtocolOperation.RpcName;
12
13 public class ProtocolOperationRpcNameBuilder {
14     private static final RpcName MATCH_ALL = new RpcName(new MatchallStringType("*"));
15
16     private ProtocolOperationRpcNameBuilder() {
17         //Exists only to defeat instantiation.
18     }
19
20     public static RpcName getDefaultInstance(final String defaultValue) {
21         return "*".equals(defaultValue) ? MATCH_ALL : new RpcName(defaultValue);
22     }
23 }