org.xbill.DNS
Class RRset

java.lang.Object
  extended by org.xbill.DNS.RRset

public class RRset
extends Object

A set of Records with the same name, type, and class. Also included are all RRSIG records signing the data records.

Author:
Brian Wellington
See Also:
Record, RRSIGRecord

Constructor Summary
RRset()
          Creates an empty RRset
RRset(Record record)
          Creates an RRset and sets its contents to the specified record
RRset(RRset rrset)
          Creates an RRset with the contents of an existing RRset
 
Method Summary
 void addRR(Record r)
          Adds a Record to an RRset
 void clear()
          Deletes all Records from an RRset
 void deleteRR(Record r)
          Deletes a Record from an RRset
 Record first()
          Returns the first record
 int getDClass()
          Returns the class of the records
 Name getName()
          Returns the name of the records
 long getTTL()
          Returns the ttl of the records
 int getType()
          Returns the type of the records
 Iterator rrs()
          Returns an Iterator listing all (data) records.
 Iterator rrs(boolean cycle)
          Returns an Iterator listing all (data) records.
 Iterator sigs()
          Returns an Iterator listing all signature records
 int size()
          Returns the number of (data) records
 String toString()
          Converts the RRset to a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RRset

public RRset()
Creates an empty RRset


RRset

public RRset(Record record)
Creates an RRset and sets its contents to the specified record


RRset

public RRset(RRset rrset)
Creates an RRset with the contents of an existing RRset

Method Detail

addRR

public void addRR(Record r)
Adds a Record to an RRset


deleteRR

public void deleteRR(Record r)
Deletes a Record from an RRset


clear

public void clear()
Deletes all Records from an RRset


rrs

public Iterator rrs(boolean cycle)
Returns an Iterator listing all (data) records.

Parameters:
cycle - If true, cycle through the records so that each Iterator will start with a different record.

rrs

public Iterator rrs()
Returns an Iterator listing all (data) records. This cycles through the records, so each Iterator will start with a different record.


sigs

public Iterator sigs()
Returns an Iterator listing all signature records


size

public int size()
Returns the number of (data) records


getName

public Name getName()
Returns the name of the records

See Also:
Name

getType

public int getType()
Returns the type of the records

See Also:
Type

getDClass

public int getDClass()
Returns the class of the records

See Also:
DClass

getTTL

public long getTTL()
Returns the ttl of the records


first

public Record first()
Returns the first record

Throws:
IllegalStateException - if the rrset is empty

toString

public String toString()
Converts the RRset to a String

Overrides:
toString in class Object