Package org.htmlunit

Class Cache.Entry

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Cache.Entry>
    Enclosing class:
    Cache

    private static class Cache.Entry
    extends java.lang.Object
    implements java.lang.Comparable<Cache.Entry>, java.io.Serializable
    A cache entry.
    • Constructor Summary

      Constructors 
      Constructor Description
      Entry​(java.lang.String key, WebResponse response, java.lang.Object value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(Cache.Entry other)
      boolean equals​(java.lang.Object obj)
      int hashCode()
      (package private) boolean isStillFresh​(long now)
      Is this cached entry still fresh?
      void touch()
      Updates the last access date.
      • Methods inherited from class java.lang.Object

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

      • key_

        private final java.lang.String key_
      • value_

        private final java.lang.Object value_
      • lastAccess_

        private long lastAccess_
      • createdAt_

        private final long createdAt_
    • Constructor Detail

      • Entry

        Entry​(java.lang.String key,
              WebResponse response,
              java.lang.Object value)
    • Method Detail

      • compareTo

        public int compareTo​(Cache.Entry other)
        Specified by:
        compareTo in interface java.lang.Comparable<Cache.Entry>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • touch

        public void touch()
        Updates the last access date.