class DnsRecord {

    public boolean isIpRelatedRecord(String ip, String zone) {
        if (isARecord()) {
            return arecord.stream().anyMatch(record -> record.equals(ip));
        } else if (isPtrRecord()) {
            return isIpRelatedPtrRecord(ip, zone);
        } else {
            return false;
        }
    }

}