Class Xref

java.lang.Object
org.sejda.sambox.xref.Xref

public class Xref extends Object
Xref table/stream entries.
Author:
Andrea Vacondio
  • Constructor Details

    • Xref

      public Xref()
  • Method Details

    • addIfAbsent

      public XrefEntry addIfAbsent(XrefEntry entry)
      Adds the given entry to the Xref if an entry with the given object number and generation is not already present.
      Parameters:
      entry -
      Returns:
      null if the entry was added. The current entry with the given object number and generation if the entry was already present.
    • add

      public XrefEntry add(XrefEntry entry)
      Adds the given entry to the Xref replacing any entry previously associated to the given object number and generation.
      Parameters:
      entry -
      Returns:
      the previous value or null if no entry was previously associated to the given object number and generation.
    • get

      public XrefEntry get(COSObjectKey objectKey)
      Parameters:
      objectKey -
      Returns:
      the XrefEntry for with the given object Number and generation number or null if nothing is found
    • values

      public Collection<XrefEntry> values()
      Returns:
      an unmodifiable view of the entries in this xref
    • highestKey

      public COSObjectKey highestKey()
      Returns:
      the highest key in this xref
    • contains

      public boolean contains(COSObjectKey objectKey)
      Parameters:
      objectKey -
      Returns:
      true if a value for the given key is registered to this xref