@Test public void testIsSerializable() { Element element = new Element(null, null); assertTrue(element.isSerializable()); Element elementWithNullValue = new Element("1", null); assertTrue(elementWithNullValue.isSerializable()); Element elementWithNullKey = new Element(null, "1"); assertTrue(elementWithNullValue.isSerializable()); Element elementWithObjectKey = new Element(new Object(), "1"); assertTrue(elementWithNullValue.isSerializable()); }
public final boolean isSerializable() { return isKeySerializable() && (value instanceof Serializable || value == null); }
Element implements Serializable, Cloneable { public final boolean isSerializable() { return isKeySerializable() && (value instanceof Serializable || value == null); } }
Element implements Serializable, Cloneable { public final boolean isSerializable() { return isKeySerializable() && (value instanceof Serializable || value == null); } Element(Serializable key, Serializable value, long version);  Element(Object key, Object value, long version);  Element(Object key, Object value, long version,
                   long creationTime, long lastAccessTime,
                   long nextToLastAccessTime, long lastUpdateTime,
                   long hitCount);  Element(Object key, Object value,
                   Boolean eternal, Integer timeToIdleSeconds, Integer timeToLiveSeconds);  Element(Serializable key, Serializable value);  Element(Object key, Object value); }
Element implements Serializable, Cloneable { public final boolean isSerializable() { return isKeySerializable() && (value instanceof Serializable || value == null); } Element(Serializable key, Serializable value, long version);  Element(Object key, Object value, long version);  Element(Object key, Object value, long version,
                   long creationTime, long lastAccessTime,
                   long nextToLastAccessTime, long lastUpdateTime,
                   long hitCount);  Element(Object key, Object value,
                   Boolean eternal, Integer timeToIdleSeconds, Integer timeToLiveSeconds);  Element(Serializable key, Serializable value);  Element(Object key, Object value); final Serializable getKey(); final Object getObjectKey(); final Serializable getValue(); final Object getObjectValue(); final boolean equals(Object object); void setTimeToLive(int timeToLiveSeconds); void setTimeToIdle(int timeToIdleSeconds); final int hashCode(); final void setVersion(long version); final long getCreationTime(); final long getLatestOfCreationAndUpdateTime(); final void setCreateTime(); final long getVersion(); final long getLastAccessTime(); final long getNextToLastAccessTime(); final long getHitCount(); final void resetAccessStatistics(); final void updateAccessStatistics(); final void updateUpdateStatistics(); final String toString(); final Object clone(); final long getSerializedSize(); final boolean isSerializable(); final boolean isKeySerializable(); long getLastUpdateTime(); boolean isExpired(); long getExpirationTime(); boolean isEternal(); void setEternal(boolean eternal); boolean isLifespanSet(); int getTimeToLive(); int getTimeToIdle(); }
Element implements Serializable, Cloneable { public final boolean isSerializable() { return isKeySerializable() && (value instanceof Serializable || value == null); } Element(Serializable key, Serializable value, long version);  Element(Object key, Object value, long version);  Element(Object key, Object value, long version,
                   long creationTime, long lastAccessTime,
                   long nextToLastAccessTime, long lastUpdateTime,
                   long hitCount);  Element(Object key, Object value,
                   Boolean eternal, Integer timeToIdleSeconds, Integer timeToLiveSeconds);  Element(Serializable key, Serializable value);  Element(Object key, Object value); final Serializable getKey(); final Object getObjectKey(); final Serializable getValue(); final Object getObjectValue(); final boolean equals(Object object); void setTimeToLive(int timeToLiveSeconds); void setTimeToIdle(int timeToIdleSeconds); final int hashCode(); final void setVersion(long version); final long getCreationTime(); final long getLatestOfCreationAndUpdateTime(); final void setCreateTime(); final long getVersion(); final long getLastAccessTime(); final long getNextToLastAccessTime(); final long getHitCount(); final void resetAccessStatistics(); final void updateAccessStatistics(); final void updateUpdateStatistics(); final String toString(); final Object clone(); final long getSerializedSize(); final boolean isSerializable(); final boolean isKeySerializable(); long getLastUpdateTime(); boolean isExpired(); long getExpirationTime(); boolean isEternal(); void setEternal(boolean eternal); boolean isLifespanSet(); int getTimeToLive(); int getTimeToIdle();  }