001/* 002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. 003 * Copyright (C) 2000-2010 The Gridarta Developers. 004 * 005 * This program is free software; you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published by 007 * the Free Software Foundation; either version 2 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License along 016 * with this program; if not, write to the Free Software Foundation, Inc., 017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 018 */ 019 020package net.sf.gridarta.plugin.parameter; 021 022import net.sf.gridarta.model.archetype.Archetype; 023import net.sf.gridarta.model.filter.NamedFilter; 024import net.sf.gridarta.model.filter.NamedFilterConfig; 025import net.sf.gridarta.model.gameobject.GameObject; 026import net.sf.gridarta.model.maparchobject.MapArchObject; 027import org.jetbrains.annotations.NotNull; 028import org.jetbrains.annotations.Nullable; 029 030public class FilterParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractStringPluginParameter<G, A, R, NamedFilterConfig> { 031 032 @NotNull 033 public static final String PARAMETER_TYPE = NamedFilterConfig.class.getName(); 034 035 @NotNull 036 private final NamedFilter defaultFilterList; 037 038 /** 039 * Creates a new instance. 040 */ 041 public FilterParameter(@NotNull final NamedFilter defaultFilterList) { 042 super(""); 043 this.defaultFilterList = defaultFilterList; 044 } 045 046 /** 047 * {@inheritDoc} 048 */ 049 @Nullable 050 @Override 051 public NamedFilterConfig getValue() { 052 return null; // XXX: not implemented 053 } 054 055 /** 056 * {@inheritDoc} 057 */ 058 @NotNull 059 @Override 060 public <T> T visit(@NotNull final PluginParameterVisitor<G, A, R, T> visitor) { 061 return visitor.visit(this); 062 } 063 064 /** 065 * {@inheritDoc} 066 */ 067 @NotNull 068 @Override 069 public String getParameterType() { 070 return PARAMETER_TYPE; 071 } 072 073}