@Test public void testGetExpirationStoredAsInteger() { Map<String, Object> data = new HashMap<String, Object>(); Integer i = 100; data.put(PersistableDevice.EXPIRATION_KEY, i); PersistableDevice device = new PersistableDevice(data); Assert.assertEquals(device.getExpiration().longValue(), 100); }
@Override public Long getExpiration() { Number num = (Number) data.get(EXPIRATION_KEY); return num == null ? null : num.longValue(); }
PersistableDevice implements ReservationHandler, DawgDevice { @Override public Long getExpiration() { Number num = (Number) data.get(EXPIRATION_KEY); return num == null ? null : num.longValue(); } }
PersistableDevice implements ReservationHandler, DawgDevice { @Override public Long getExpiration() { Number num = (Number) data.get(EXPIRATION_KEY); return num == null ? null : num.longValue(); } PersistableDevice();  PersistableDevice(DawgDevice device);  PersistableDevice(Map<String, Object> data); }
PersistableDevice implements ReservationHandler, DawgDevice { @Override public Long getExpiration() { Number num = (Number) data.get(EXPIRATION_KEY); return num == null ? null : num.longValue(); } PersistableDevice();  PersistableDevice(DawgDevice device);  PersistableDevice(Map<String, Object> data); @Override Long getExpiration(); @Override void setExpiration(Long expiration); String[] getKeys(); void setKeys(String[] keys); String getId(); void setId(String id); Map<String, Object> getData(); void setData(Map<String,Object> data); @Override int hashCode(); @Override boolean equals(Object obj); @Override String reserve(String token); @Override boolean isReserved(); @Override String unreserve(); @Override String getReserver(); }
PersistableDevice implements ReservationHandler, DawgDevice { @Override public Long getExpiration() { Number num = (Number) data.get(EXPIRATION_KEY); return num == null ? null : num.longValue(); } PersistableDevice();  PersistableDevice(DawgDevice device);  PersistableDevice(Map<String, Object> data); @Override Long getExpiration(); @Override void setExpiration(Long expiration); String[] getKeys(); void setKeys(String[] keys); String getId(); void setId(String id); Map<String, Object> getData(); void setData(Map<String,Object> data); @Override int hashCode(); @Override boolean equals(Object obj); @Override String reserve(String token); @Override boolean isReserved(); @Override String unreserve(); @Override String getReserver(); static final String RESERVER; static final String EXPIRATION_KEY; }