use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.secondary.explicit.route.object.SeroBuilder in project bgpcep by opendaylight.
the class PCEPSecondaryExplicitRouteObjecParser method parseObject.
@Override
public Sero parseObject(final ObjectHeader header, final ByteBuf buffer) throws PCEPDeserializerException {
Preconditions.checkArgument(buffer != null && buffer.isReadable(), EMPTY_ARRAY_ERROR);
final SeroBuilder builder = new SeroBuilder();
builder.setIgnore(header.getIgnore());
builder.setProcessingRule(header.getProcessingRule());
final List<Subobject> subObjects = parseSubobjects(buffer);
builder.setSubobject(subObjects.stream().map(so -> new SubobjectBuilder().setLoose(so.getLoose()).setSubobjectType(so.getSubobjectType()).build()).collect(Collectors.toList()));
return builder.build();
}
Aggregations