1 /* 2 MadCaching is a Tile Caching solution 3 Copyright (C) 2005 Mac Vu 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 2 8 of the License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 package com.macvu.tiles.capture; 20 21 import java.util.Set; 22 import java.util.HashSet; 23 24 public class TilesCacheableCapture { 25 // Enable capture information for tiles. This is in memory only. Should not be serializable. 26 boolean enableCapture = false; 27 28 // Set of tiles that the capture have visited. 29 Set capturedTiles; 30 31 public TilesCacheableCapture() { 32 capturedTiles = new HashSet(); 33 } 34 35 public boolean isEnableCapture() { 36 return enableCapture; 37 } 38 39 public void setEnableCapture(boolean enableCapture) { 40 this.enableCapture = enableCapture; 41 42 // Clear the captureFiles Set. 43 capturedTiles.clear(); 44 } 45 46 public void putCapturedTile(String tilename) { 47 capturedTiles.add(tilename); 48 } 49 50 public Set getCapturedTiles() { 51 return capturedTiles; 52 } 53 54 public void clearCapturedTilesSet() { 55 capturedTiles.clear(); 56 } 57 }