Record Class UrlHandle.Metadata

java.lang.Object
java.lang.Record
uno.anahata.asi.agi.resource.handle.UrlHandle.Metadata
Record Components:
mimeType - The detected MIME type.
lastModified - The remote last modified timestamp.
exists - Whether the remote source is reachable.
contentLength - The size of the remote resource in bytes.
Enclosing class:
UrlHandle

private static record UrlHandle.Metadata(String mimeType, long lastModified, boolean exists, long contentLength) extends Record
Record for holding captured metadata.
Author:
anahata
  • Field Details

    • mimeType

      private final String mimeType
      The field for the mimeType record component.
    • lastModified

      private final long lastModified
      The field for the lastModified record component.
    • exists

      private final boolean exists
      The field for the exists record component.
    • contentLength

      private final long contentLength
      The field for the contentLength record component.
  • Constructor Details

    • Metadata

      private Metadata(String mimeType, long lastModified, boolean exists, long contentLength)
      Creates an instance of a Metadata record class.
      Parameters:
      mimeType - the value for the mimeType record component
      lastModified - the value for the lastModified record component
      exists - the value for the exists record component
      contentLength - the value for the contentLength record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • mimeType

      public String mimeType()
      Returns the value of the mimeType record component.
      Returns:
      the value of the mimeType record component
    • lastModified

      public long lastModified()
      Returns the value of the lastModified record component.
      Returns:
      the value of the lastModified record component
    • exists

      public boolean exists()
      Returns the value of the exists record component.
      Returns:
      the value of the exists record component
    • contentLength

      public long contentLength()
      Returns the value of the contentLength record component.
      Returns:
      the value of the contentLength record component