
fitlibraryGeneric.specify.collections.GenericMaps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitlibrary Show documentation
Show all versions of fitlibrary Show documentation
FitLibrary provides general-purpose fixtures (and runners) for storytests with Fit and FitNesse.
The newest version!
/*
* Copyright (c) 2006 Rick Mugridge, www.RimuResearch.com
* Released under the terms of the GNU General Public License version 2 or later.
* Written: 23/09/2006
*/
package fitlibraryGeneric.specify.collections;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import fitlibrary.collection.map.ListOfMapsTraverse;
import fitlibrary.collection.map.SubsetMapTraverse;
import fitlibrary.specify.eg.Colour;
public class GenericMaps {
private Map aMap = new HashMap();
private Map> aMapOfMaps = new HashMap>();
public GenericMaps() {
aMap.put(Colour.GREEN, Colour.BLUE);
aMap.put(Colour.BLACK, Colour.YELLOW);
cyclicMaps(Colour.RED, Colour.GREEN);
cyclicMaps(Colour.WHITE,Colour.BLACK);
cyclicMaps(Colour.BLUE, Colour.YELLOW);
}
private void cyclicMaps(Colour colour1, Colour colour2) {
Map map1 = new HashMap();
map1.put(colour2,colour1);
aMapOfMaps.put(colour1,map1);
}
public Map> getAMapOfMaps() {
return aMapOfMaps;
}
public void setAMapOfMaps(Map> mapOfMaps) {
aMapOfMaps = mapOfMaps;
}
public Map getAMap() {
return aMap;
}
public void setAMap(Map map) {
aMap = map;
}
@SuppressWarnings("unchecked")
public SubsetMapTraverse aSubsetMap() {
return new SubsetMapTraverse(new HashMap(aMap));
}
public ListOfMapsTraverse aListOfMaps() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy