public class Language extends SymbolSet implements java.lang.Cloneable
Library classifierLibrary, Class Language
Copyright by Klaus Hufschlag 2004,2005,2006
This file is part of the Generic Classifier Library. The Generic Classifier Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Generic Classifier 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the Generic Classifier Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Constructor and Description |
---|
Language(java.lang.String name)
Constructor
|
Language(java.lang.String name,
java.lang.String[] symbolNames)
Constructor, creates an instance containing elements following a list of
names.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Symbol s,
Symbol parent)
Adds a Symbol to a set, as a subordinate to a parent.
|
void |
addMultiSymbols(java.lang.String[] names,
Symbol parent)
Adds Symbols following a list of names to the instance.
|
boolean |
checkRel(Symbol parent,
Symbol child)
Checks wether the an element given as parent is really Funktion prüft, ob
das als superordinate to the symbol given as child.
|
java.lang.Object |
clone() |
void |
debug_out()
Method for debugging-purposes.
|
java.util.ArrayList |
getChildren(Symbol s)
Returns all child elements of a given Symbol as defined in this Language.
|
boolean |
hasWildcards()
Checks wheter the language contains symbols that are superordinates to
other symbols also contained in the language
|
void |
remove()
Removes all Symbols from the instance.
|
void |
remove(Symbol s)
Removes a Symbol from the set.
|
add, add, addMultiSymbols, asCollection, contains, contains, contains, getDefault, getName, getSize, iterator, powerSet, randomSymbol, remove, setDefault, setDefault, setName, symbolByName
public Relation hierarchy
public Language(java.lang.String name)
name
- Name of Language to be created.public Language(java.lang.String name, java.lang.String[] symbolNames)
name
- Name of Language to be createdsymbolNames
- List of names of Symbols to be includedpublic void add(Symbol s, Symbol parent)
s
- Element to be addedparent
- Parent element.public void addMultiSymbols(java.lang.String[] names, Symbol parent)
names
- parent
- public void remove(Symbol s)
SymbolSet
public void remove()
SymbolSet
public boolean checkRel(Symbol parent, Symbol child)
parent
- child
- public void debug_out()
SymbolSet
public boolean hasWildcards()
public java.util.ArrayList getChildren(Symbol s)
s
- Symbol serving as parent