Package se.conciliate.extensions.type
Interface Type
- All Known Subinterfaces:
EdgeType
,ModelFamily
,ModelType
,SymbolType
,SymbolVariant
public interface Type
A type is a named identifier and the common base interface for
EdgeType
,
ModelType
and SymbolType
. The name might be available in different
locales.-
Method Details
-
getID
String getID()A unique identifier for this type. The implementation is free to implement any uniqueness scheme they want, so long as the rules below are followed, but they are required to guarantee uniqueness. Popular schemes might include UUID in string form or the Java package naming scheme (e.g. se.conciliate.mytype).
ID naming rules. Unless explicitly stated here, a character is not allowed:
Example English characters a-z
andA-Z
Numbers 0-9
ASCII dashes -
and_
Punctuation marks .
Special characters #
No other characters are allowed. The allowed characters may come in any sequence. A type id is case sensitive.
Types that do not adhere to these rules might work, no exceptions or indications that disallowed characters are used is guaranteed.- Returns:
- A string uniquely identifying this type.
- Since:
- 3.2
-
getName
String getName()Returns a displayable, understandable name for this type. If there is no suitable name in the current locale a default name must be returned. That is, null must never be returned.- Returns:
- A displayable name of the type. The return value should take the current locale into account if translations are available.
- Since:
- 3.2
-
getName
Returns a displayable name for this extension in the specified locale. This may be the same for all locales but must never be null. That means that no matter what locale is sent in a default return value must always exist.- Parameters:
locale
- The locale that the name is needed in. The parameter can be ignored by implementations.- Returns:
- a displayable name for this extension in the specified locale.
-
definedBy
ModelExtension definedBy()Returns the model extension that defines this type.- Returns:
- the model extension that defines this type.
-