net.sf.cpsolver.ifs.util
Class SoftCache
java.lang.Object
net.sf.cpsolver.ifs.util.SoftCache
- All Implemented Interfaces:
- Map
public class SoftCache
- extends Object
- implements Map
Simple table cache (key, value) using java soft references.
- Version:
- IFS 1.1 (Iterative Forward Search)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Methods inherited from interface java.util.Map |
hashCode |
SoftCache
public SoftCache()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map
clear
public void clear()
- Specified by:
clear
in interface Map
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map
get
public Object get(Object key)
- Specified by:
get
in interface Map
remove
public Object remove(Object key)
- Specified by:
remove
in interface Map
put
public Object put(Object key,
Object value)
- Specified by:
put
in interface Map
putSoft
public Object putSoft(Object key,
Object value)
putWeak
public Object putWeak(Object key,
Object value)
putAll
public void putAll(Map map)
- Specified by:
putAll
in interface Map
size
public int size()
- Specified by:
size
in interface Map
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
values
public Collection values()
- Specified by:
values
in interface Map
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map
- Overrides:
equals
in class Object
cleanDeallocated
public void cleanDeallocated()
test
public static void test()