public interface Identifiable<I extends Identifiable<I>> extends Extendable<I>
String
id.Modifier and Type | Method and Description |
---|---|
default void |
addAlias(String alias)
Add an alias to the object.
|
default void |
addAlias(String alias,
String aliasType)
Add an alias to the object.
|
default Set<String> |
getAliases()
Get the aliases of the object.
|
default Optional<String> |
getAliasFromType(String aliasType)
Get the alias of the object with a given alias type if it exists.
|
default Optional<String> |
getAliasType(String alias)
Get the alias type of an alias if it exists, an empty optional otherwise.
|
String |
getId()
Get the unique identifier of the object.
|
default String |
getName()
Deprecated.
Use
getNameOrId() or getOptionalName() instead. |
default String |
getNameOrId()
Get the name of the object if it exists.
|
Network |
getNetwork()
Get the network associated to the object.
|
default Optional<String> |
getOptionalName()
Return an optional containing the name of the object if it exists.
|
default Properties |
getProperties()
Deprecated.
Use
getProperty(String) & setProperty(String, String) instead. |
String |
getProperty(String key)
Get property associated to specified key.
|
String |
getProperty(String key,
String defaultValue)
Get property associated to specified key, with default value.
|
Set<String> |
getPropertyNames()
Get properties key values.
|
default boolean |
hasAliases()
Return true if identifiable has aliases.
|
boolean |
hasProperty()
Check that this object has some properties.
|
boolean |
hasProperty(String key)
Check that this object has property with specified name.
|
default boolean |
isFictitious()
Get the fictitious status
|
default void |
removeAlias(String alias)
Remove an alias of the object.
|
default void |
setFictitious(boolean fictitious)
Set the fictitious status
|
String |
setProperty(String key,
String value)
Set property value associated to specified key.
|
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, newExtension, removeExtension
Network getNetwork()
String getId()
@Deprecated default String getName()
getNameOrId()
or getOptionalName()
instead.default Optional<String> getAliasFromType(String aliasType)
default Optional<String> getAliasType(String alias)
default void addAlias(String alias)
PowsyblException
default void addAlias(String alias, String aliasType)
PowsyblException
If a given non null type already has an associated alias for this object, throw a PowsyblException
default void removeAlias(String alias)
PowsyblException
default boolean hasAliases()
default Optional<String> getOptionalName()
default String getNameOrId()
boolean hasProperty()
@Deprecated default Properties getProperties()
getProperty(String)
& setProperty(String, String)
instead.boolean hasProperty(String key)
String getProperty(String key, String defaultValue)
String setProperty(String key, String value)
default boolean isFictitious()
default void setFictitious(boolean fictitious)
Copyright © 2020. All rights reserved.