Class LookupResult

java.lang.Object
org.xbill.DNS.lookup.LookupResult

public final class LookupResult extends Object
LookupResult instances holds the result of a successful lookup operation.
Since:
3.4
  • Constructor Details

    • LookupResult

      @Deprecated public LookupResult(List<Record> records, List<Name> aliases)
      Deprecated.
      This class is not intended for public instantiation.
      Construct an instance with the provided records and, in the case of a CNAME or DNAME indirection a List of aliases.
      Parameters:
      records - a list of records to return.
      aliases - a list of aliases discovered during lookup, or null if there was no indirection.
  • Method Details

    • getRecords

      public List<Record> getRecords()
      An unmodifiable list of records that this instance wraps, may not be null but can be empty
    • getAliases

      public List<Name> getAliases()
      In the case of CNAME or DNAME indirection, this property contains the original name as well as any intermediate redirect targets except the last one. For example, if X is a CNAME pointing to Y which is a CNAME pointing to Z which has an A record, aliases will hold X and Y after successful lookup.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object