Class HomeZone
A named grouping of rooms -- "upstairs", "the annexe": HomeKit's HMZone.
HomeKit only. No other backend has the concept, and
HomeStructure.getZones() returns an empty list on them rather than
synthesizing groupings out of room names. A guess about which rooms a user
thinks of as upstairs is not information, and an app that laid out its
navigation around invented zones would look broken on the platform that has
real ones.
An immutable snapshot.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HomeZone
Creates a zone snapshot. Called by the iOS port.
Parameters
-
id: the zone identifier -
name: the user-visible name, ornullfor none -
roomIds: the rooms in this zone;nullbecomes empty
Throws
IllegalArgumentException: whenidisnullor empty
-
-
-
Method Details
-
getId
The identifier this zone is addressed by.
Returns
the identifier, never
null -
getName
The user-visible name, empty when the zone has none.
Returns
the name, never
null -
getRoomIds
-
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-