Package moss
Class FreeTypeMgr
java.lang.Object
moss.TypeMgr
moss.FreeTypeMgr
- All Implemented Interfaces:
Serializable
Class for a node or edge type map.
- Since:
- 2007.06.20
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Add a type to the type map.void
clear()
Clear the type map (remove all types).int
Map a type name to the corresponding type code.getName
(int code) Map a type code to the corresponding type name.int
Get the number of managed types.boolean
isFixed()
Check whether a type manager is fixed (is not extendable).int
size()
Get the current number of types.Methods inherited from class moss.TypeMgr
getBase, isSpecial, isWildcard
-
Constructor Details
-
FreeTypeMgr
public FreeTypeMgr()Create a type map.- Since:
- 2007.06.20 (Christian Borgelt)
-
-
Method Details
-
isFixed
public boolean isFixed()Check whether a type manager is fixed (is not extendable). -
getTypeCount
public int getTypeCount()Get the number of managed types.- Specified by:
getTypeCount
in classTypeMgr
- Returns:
- the number of types in this type manager
- Since:
- 2020.10.16 (Christian Borgelt)
-
clear
public void clear()Clear the type map (remove all types).- Since:
- 2007.06.20 (Christian Borgelt)
-
size
public int size()Get the current number of types.- Returns:
- the current number of types
- Since:
- 2007.06.20 (Christian Borgelt)
-
add
Add a type to the type map.If the name is already present, no new mapping is added, but the code already associated with the name is returned, thus automatically avoiding duplicate entries.
-
getCode
Map a type name to the corresponding type code. -
getName
Map a type code to the corresponding type name.
-