Gridarta Editor
ParameterType.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (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 along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.textedit.textarea.tokenmarker;
21 
22 import java.util.regex.Pattern;
23 
28 public enum ParameterType {
29 
33  INTEGER("[0-9]+"),
34 
38  STRING("[a-zA-Z_][a-zA-Z_0-9]*"),
39 
43  STRING_INTEGER("[a-zA-Z_][a-zA-Z_0-9]*:[-+]?[0-9]+(,[a-zA-Z_][a-zA-Z_0-9]*:[-+]?[0-9]+)*");
44 
48  private final Pattern pattern;
49 
54  ParameterType(final String regex) {
55  pattern = Pattern.compile(regex);
56  }
57 
62  public Pattern getPattern() {
63  return pattern;
64  }
65 
66 }
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.ParameterType
ParameterType(final String regex)
Definition: ParameterType.java:54
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.pattern
final Pattern pattern
Definition: ParameterType.java:48
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.INTEGER
INTEGER
Definition: ParameterType.java:33
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.STRING
STRING
Definition: ParameterType.java:38
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.STRING_INTEGER
STRING_INTEGER
Definition: ParameterType.java:43
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType.getPattern
Pattern getPattern()
Definition: ParameterType.java:62
net.sf.gridarta.textedit.textarea.tokenmarker.ParameterType
Definition: ParameterType.java:28