Back to project page Dumbledroid.
The source code is released under:
Copyright (c) 2013, Leocadio Tin? All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project Dumbledroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.leocad.dumbledroid.data.cache; /* w w w . j av a2s.c om*/ import io.leocad.dumbledroid.data.AbstractModel; import java.io.Serializable; public class ModelHolder implements Serializable { private static final long serialVersionUID = -884696290834846261L; public AbstractModel model; public long timestamp; public ModelHolder(AbstractModel model, long timestamp) { this.model = model; this.timestamp = timestamp; } public boolean isExpired() { long elapsedTime = System.currentTimeMillis() - timestamp; return elapsedTime > model.cacheDuration; } }