Package org.openhab.core.thing.link
Class AbstractLink
java.lang.Object
org.openhab.core.thing.link.AbstractLink
- All Implemented Interfaces:
Identifiable<String>
- Direct Known Subclasses:
ItemChannelLink
AbstractLink
is the abstract base class of all links.- Author:
- Dennis Nobel - Initial contribution
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
AbstractLink
Constructor.- Parameters:
itemName
- the item name for the link- Throws:
IllegalArgumentException
- if the item name is invalid
-
-
Method Details
-
getIDFor
Returns the link ID for a given item name and UID- Parameters:
itemName
- item nameuid
- UID- Returns:
- the item channel link ID
-
equals
-
getUID
Returns the ID for the link.- Specified by:
getUID
in interfaceIdentifiable<String>
- Returns:
- id (can not be null)
-
getItemName
Returns the item that is linked to the object.- Returns:
- item name (can not be null)
-
getLinkedUID
Returns the UID of the object, which is linked to the item.- Returns:
- UID (can not be null)
-
hashCode
public int hashCode() -
toString
-