@Test public void testEquals() { Element element = new Element("key", "value"); assertFalse(element.equals("dog")); assertTrue(element.equals(element)); assertFalse(element.equals(null)); assertFalse(element.equals(new Element("cat", "hat"))); }
@Override public final boolean equals(final Object object) { if (object == null || !(object instanceof Element)) { return false; } Element element = (Element) object; if (key == null || element.getObjectKey() == null) { return false; } return key.equals(element.getObjectKey()); }
Element implements Serializable, Cloneable { @Override public final boolean equals(final Object object) { if (object == null || !(object instanceof Element)) { return false; } Element element = (Element) object; if (key == null || element.getObjectKey() == null) { return false; } return key.equals(element.getObjectKey()); } }
Element implements Serializable, Cloneable { @Override public final boolean equals(final Object object) { if (object == null || !(object instanceof Element)) { return false; } Element element = (Element) object; if (key == null || element.getObjectKey() == null) { return false; } return key.equals(element.getObjectKey()); } Element(final Serializable key, final Serializable value, final long version);  Element(final Object key, final Object value, final long version); @Deprecated  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime, final long nextToLastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version, final long creationTime,
            final long lastAccessTime, final long hitCount, final int timeToLive, final int timeToIdle,
            final long lastUpdateTime);  Element(final Object key, final Object value,
                   final Boolean eternal, final Integer timeToIdleSeconds, final Integer timeToLiveSeconds);  Element(final Serializable key, final Serializable value);  Element(final Object key, final Object value); }
Element implements Serializable, Cloneable { @Override public final boolean equals(final Object object) { if (object == null || !(object instanceof Element)) { return false; } Element element = (Element) object; if (key == null || element.getObjectKey() == null) { return false; } return key.equals(element.getObjectKey()); } Element(final Serializable key, final Serializable value, final long version);  Element(final Object key, final Object value, final long version); @Deprecated  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime, final long nextToLastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version, final long creationTime,
            final long lastAccessTime, final long hitCount, final int timeToLive, final int timeToIdle,
            final long lastUpdateTime);  Element(final Object key, final Object value,
                   final Boolean eternal, final Integer timeToIdleSeconds, final Integer timeToLiveSeconds);  Element(final Serializable key, final Serializable value);  Element(final Object key, final Object value); final Serializable getKey(); final Object getObjectKey(); final Serializable getValue(); final Object getObjectValue(); @Override final boolean equals(final Object object); void setTimeToLive(final int timeToLiveSeconds); void setTimeToIdle(final int timeToIdleSeconds); @Override final int hashCode(); final void setVersion(final long version); @Deprecated final void setCreateTime(); final long getCreationTime(); final long getLatestOfCreationAndUpdateTime(); final long getVersion(); final long getLastAccessTime(); @Deprecated final long getNextToLastAccessTime(); final long getHitCount(); ElementEvictionData getElementEvictionData(); void setElementEvictionData(ElementEvictionData elementEvictionData); final void resetAccessStatistics(); final void updateAccessStatistics(); final void updateUpdateStatistics(); @Override final String toString(); @Override final Object clone(); final long getSerializedSize(); final boolean isSerializable(); final boolean isKeySerializable(); long getLastUpdateTime(); boolean isExpired(); long getExpirationTime(); boolean isEternal(); void setEternal(final boolean eternal); boolean isLifespanSet(); int getTimeToLive(); int getTimeToIdle(); }
Element implements Serializable, Cloneable { @Override public final boolean equals(final Object object) { if (object == null || !(object instanceof Element)) { return false; } Element element = (Element) object; if (key == null || element.getObjectKey() == null) { return false; } return key.equals(element.getObjectKey()); } Element(final Serializable key, final Serializable value, final long version);  Element(final Object key, final Object value, final long version); @Deprecated  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime, final long nextToLastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version,
                   final long creationTime, final long lastAccessTime,
                   final long lastUpdateTime, final long hitCount);  Element(final Object key, final Object value, final long version, final long creationTime,
            final long lastAccessTime, final long hitCount, final int timeToLive, final int timeToIdle,
            final long lastUpdateTime);  Element(final Object key, final Object value,
                   final Boolean eternal, final Integer timeToIdleSeconds, final Integer timeToLiveSeconds);  Element(final Serializable key, final Serializable value);  Element(final Object key, final Object value); final Serializable getKey(); final Object getObjectKey(); final Serializable getValue(); final Object getObjectValue(); @Override final boolean equals(final Object object); void setTimeToLive(final int timeToLiveSeconds); void setTimeToIdle(final int timeToIdleSeconds); @Override final int hashCode(); final void setVersion(final long version); @Deprecated final void setCreateTime(); final long getCreationTime(); final long getLatestOfCreationAndUpdateTime(); final long getVersion(); final long getLastAccessTime(); @Deprecated final long getNextToLastAccessTime(); final long getHitCount(); ElementEvictionData getElementEvictionData(); void setElementEvictionData(ElementEvictionData elementEvictionData); final void resetAccessStatistics(); final void updateAccessStatistics(); final void updateUpdateStatistics(); @Override final String toString(); @Override final Object clone(); final long getSerializedSize(); final boolean isSerializable(); final boolean isKeySerializable(); long getLastUpdateTime(); boolean isExpired(); long getExpirationTime(); boolean isEternal(); void setEternal(final boolean eternal); boolean isLifespanSet(); int getTimeToLive(); int getTimeToIdle();  }