Search in sources :

Example 1 with StringTlv

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlv in project bgpcep by opendaylight.

the class PeerUpHandler method addTlv.

@Override
protected void addTlv(final InformationBuilder builder, final Tlv tlv) {
    if (tlv instanceof StringTlv) {
        final ImmutableList.Builder<StringInformation> stringInfoListBuilder = ImmutableList.builder();
        if (builder.getStringInformation() != null) {
            stringInfoListBuilder.addAll(builder.getStringInformation());
        }
        builder.setStringInformation(stringInfoListBuilder.add(new StringInformationBuilder().setStringTlv(new StringTlvBuilder((StringTlv) tlv).build()).build()).build());
    }
}
Also used : StringTlv(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlv) StringInformation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.informations.StringInformation) ImmutableList(com.google.common.collect.ImmutableList) StringInformationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.informations.StringInformationBuilder) StringTlvBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlvBuilder)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 StringInformation (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.informations.StringInformation)1 StringInformationBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.informations.StringInformationBuilder)1 StringTlv (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlv)1 StringTlvBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlvBuilder)1