Class BaseRef

  • Direct Known Subclasses:
    DocumentRef, NamedDocumentRef

    public abstract class BaseRef
    extends java.lang.Object
    Represents a reference to a document within a collection. This abstract class serves as a base for specific types of document references, encapsulating the collection to which the reference belongs.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseRef​(Module coll)
      Constructs a new BaseRef object with the specified collection.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean equals​(java.lang.Object o)
      Indicates whether some other object is "equal to" this reference.
      Module getCollection()
      Gets the collection to which this reference belongs.
      abstract int hashCode()
      Returns a hash code value for the object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseRef

        public BaseRef​(Module coll)
        Constructs a new BaseRef object with the specified collection.
        Parameters:
        coll - The module to which the document reference belongs.
    • Method Detail

      • getCollection

        public Module getCollection()
        Gets the collection to which this reference belongs.
        Returns:
        The Module representing the collection associated with this reference.
      • equals

        public abstract boolean equals​(java.lang.Object o)
        Indicates whether some other object is "equal to" this reference. This method should be overridden in subclasses to provide specific equality logic.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the reference object with which to compare.
        Returns:
        true if this reference is the same as the object argument; false otherwise.
      • hashCode

        public abstract int hashCode()
        Returns a hash code value for the object. This method should be overridden in subclasses to provide specific hash code logic.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this reference.