本文整理了Java中org.fourthline.cling.model.meta.Device.findEmbeddedDevices()
方法的一些代码示例,展示了Device.findEmbeddedDevices()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.findEmbeddedDevices()
方法的具体详情如下:
包路径:org.fourthline.cling.model.meta.Device
类名称:Device
方法名:findEmbeddedDevices
暂无
代码示例来源:origin: 4thline/cling
public D[] findEmbeddedDevices() {
return toDeviceArray(findEmbeddedDevices((D) this));
}
代码示例来源:origin: 4thline/cling
public Icon[] findIcons() {
List<Icon> icons = new ArrayList<>();
if (hasIcons()) {
icons.addAll(Arrays.asList(getIcons()));
}
D[] embeddedDevices = findEmbeddedDevices();
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasIcons()) {
icons.addAll(Arrays.asList(embeddedDevice.getIcons()));
}
}
return icons.toArray(new Icon[icons.size()]);
}
代码示例来源:origin: 4thline/cling
protected Collection<D> findEmbeddedDevices(D current) {
Collection<D> devices = new HashSet<>();
if (!current.isRoot() && current.getIdentity().getUdn() != null)
devices.add(current);
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(findEmbeddedDevices(embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: 4thline/cling
protected Collection<S> findServices(ServiceType serviceType, ServiceId serviceId, D current) {
Collection services = new HashSet<>();
if (current.hasServices()) {
for (Service service : current.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
Collection<D> embeddedDevices = findEmbeddedDevices(current);
if (embeddedDevices != null) {
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasServices()) {
for (Service service : embeddedDevice.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
}
}
return services;
}
代码示例来源:origin: kingthy/TVRemoteIME
public D[] findEmbeddedDevices() {
return toDeviceArray(findEmbeddedDevices((D) this));
}
代码示例来源:origin: kingthy/TVRemoteIME
public Icon[] findIcons() {
List<Icon> icons = new ArrayList();
if (hasIcons()) {
icons.addAll(Arrays.asList(getIcons()));
}
D[] embeddedDevices = findEmbeddedDevices();
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasIcons()) {
icons.addAll(Arrays.asList(embeddedDevice.getIcons()));
}
}
return icons.toArray(new Icon[icons.size()]);
}
代码示例来源:origin: kingthy/TVRemoteIME
protected Collection<D> findEmbeddedDevices(D current) {
Collection<D> devices = new HashSet();
if (!current.isRoot()) {
devices.add(current);
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(findEmbeddedDevices(embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: kingthy/TVRemoteIME
protected Collection<S> findServices(ServiceType serviceType, ServiceId serviceId, D current) {
Collection services = new HashSet();
if (current.hasServices()) {
for (Service service : current.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
Collection<D> embeddedDevices = findEmbeddedDevices(current);
if (embeddedDevices != null) {
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasServices()) {
for (Service service : embeddedDevice.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
}
}
return services;
}
代码示例来源:origin: org.fourthline.cling/cling-core
public D[] findEmbeddedDevices() {
return toDeviceArray(findEmbeddedDevices((D) this));
}
代码示例来源:origin: org.fourthline.cling/cling-core
public Icon[] findIcons() {
List<Icon> icons = new ArrayList<>();
if (hasIcons()) {
icons.addAll(Arrays.asList(getIcons()));
}
D[] embeddedDevices = findEmbeddedDevices();
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasIcons()) {
icons.addAll(Arrays.asList(embeddedDevice.getIcons()));
}
}
return icons.toArray(new Icon[icons.size()]);
}
代码示例来源:origin: org.fourthline.cling/cling-core
protected Collection<D> findEmbeddedDevices(D current) {
Collection<D> devices = new HashSet<>();
if (!current.isRoot() && current.getIdentity().getUdn() != null)
devices.add(current);
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(findEmbeddedDevices(embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: org.fourthline.cling/cling-core
protected Collection<S> findServices(ServiceType serviceType, ServiceId serviceId, D current) {
Collection services = new HashSet<>();
if (current.hasServices()) {
for (Service service : current.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
Collection<D> embeddedDevices = findEmbeddedDevices(current);
if (embeddedDevices != null) {
for (D embeddedDevice : embeddedDevices) {
if (embeddedDevice.hasServices()) {
for (Service service : embeddedDevice.getServices()) {
if (isMatch(service, serviceType, serviceId))
services.add(service);
}
}
}
}
return services;
}
内容来源于网络,如有侵权,请联系作者删除!