Update visualization
This commit is contained in:
parent
9c39f44897
commit
2191bb7a77
@ -14,9 +14,8 @@ public interface DeviceHub : Provider {
|
|||||||
|
|
||||||
override val defaultChainTarget: String get() = Device.DEVICE_TARGET
|
override val defaultChainTarget: String get() = Device.DEVICE_TARGET
|
||||||
|
|
||||||
override fun content(target: String): Map<Name, Any> {
|
override fun content(target: String): Map<Name, Any> = if (target == Device.DEVICE_TARGET) {
|
||||||
if (target == Device.DEVICE_TARGET) {
|
buildMap {
|
||||||
return buildMap {
|
|
||||||
fun putAll(prefix: Name, hub: DeviceHub) {
|
fun putAll(prefix: Name, hub: DeviceHub) {
|
||||||
hub.devices.forEach {
|
hub.devices.forEach {
|
||||||
put(prefix + it.key, it.value)
|
put(prefix + it.key, it.value)
|
||||||
@ -32,8 +31,7 @@ public interface DeviceHub : Provider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw IllegalArgumentException("Target $target is not supported for $this")
|
emptyMap()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public companion object
|
public companion object
|
||||||
|
Loading…
Reference in New Issue
Block a user