Removes a record from the Zone @param r The record to be removed @see Record
(Record r)
| 486 | * @see Record |
| 487 | */ |
| 488 | public void |
| 489 | removeRecord(Record r) { |
| 490 | Name name = r.getName(); |
| 491 | int rtype = r.getRRsetType(); |
| 492 | synchronized (this) { |
| 493 | RRset rrset = findRRset(name, rtype); |
| 494 | if (rrset == null) |
| 495 | return; |
| 496 | if (rrset.size() == 1 && rrset.first().equals(r)) |
| 497 | removeRRset(name, rtype); |
| 498 | else |
| 499 | rrset.deleteRR(r); |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | /** |
| 504 | * Returns an Iterator over the RRsets in the zone. |
nothing calls this directly
no test coverage detected