d6ab28db0ee1f961e0f744fcfcc4e88bf58bc6a2
[hc2vpp.git] /
1 package io.fd.honeycomb.translate.v3po.interfacesstate.ip.dump.check;
2
3 import io.fd.honeycomb.translate.util.read.cache.EntityDumpNonEmptyCheck;
4 import io.fd.honeycomb.translate.util.read.cache.exceptions.check.DumpCheckFailedException;
5 import io.fd.honeycomb.translate.util.read.cache.exceptions.check.i.DumpEmptyException;
6 import org.openvpp.jvpp.core.dto.IpAddressDetailsReplyDump;
7
8 public class AddressDumpCheck implements EntityDumpNonEmptyCheck<IpAddressDetailsReplyDump> {
9
10     @Override
11     public void assertNotEmpty(final IpAddressDetailsReplyDump data) throws DumpCheckFailedException {
12         if (data == null || data.ipAddressDetails == null) {
13             throw new DumpEmptyException("Invalid data dumped");
14         }
15     }
16 }