本文整理了Java中org.fourthline.cling.model.meta.Device.find()
方法的一些代码示例,展示了Device.find()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.find()
方法的具体详情如下:
包路径:org.fourthline.cling.model.meta.Device
类名称:Device
方法名:find
暂无
代码示例来源:origin: 4thline/cling
public D[] findDevices(ServiceType serviceType) {
return toDeviceArray(find(serviceType, (D) this));
}
代码示例来源:origin: 4thline/cling
public D[] findDevices(DeviceType deviceType) {
return toDeviceArray(find(deviceType, (D) this));
}
代码示例来源:origin: 4thline/cling
protected Collection<D> find(DeviceType deviceType, D current) {
Collection<D> devices = new HashSet<>();
// Type might be null if we just discovered the device and it hasn't yet been hydrated
if (current.getType() != null && current.getType().implementsVersion(deviceType)) {
devices.add(current);
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(find(deviceType, embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: 4thline/cling
protected D find(UDN udn, D current) {
if (current.getIdentity() != null && current.getIdentity().getUdn() != null) {
if (current.getIdentity().getUdn().equals(udn)) return current;
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
D match;
if ((match = find(udn, embeddedDevice)) != null) return match;
}
}
return null;
}
代码示例来源:origin: kingthy/TVRemoteIME
public D[] findDevices(ServiceType serviceType) {
return toDeviceArray(find(serviceType, (D) this));
}
代码示例来源:origin: kingthy/TVRemoteIME
public D[] findDevices(DeviceType deviceType) {
return toDeviceArray(find(deviceType, (D) this));
}
代码示例来源:origin: kingthy/TVRemoteIME
protected Collection<D> find(DeviceType deviceType, D current) {
Collection<D> devices = new HashSet();
// Type might be null if we just discovered the device and it hasn't yet been hydrated
if (current.getType() != null && current.getType().implementsVersion(deviceType)) {
devices.add(current);
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(find(deviceType, embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: kingthy/TVRemoteIME
protected D find(UDN udn, D current) {
if (current.getIdentity().getUdn().equals(udn)) return current;
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
D match;
if ((match = find(udn, embeddedDevice)) != null) return match;
}
}
return null;
}
代码示例来源:origin: org.fourthline.cling/cling-core
public D[] findDevices(ServiceType serviceType) {
return toDeviceArray(find(serviceType, (D) this));
}
代码示例来源:origin: org.fourthline.cling/cling-core
public D[] findDevices(DeviceType deviceType) {
return toDeviceArray(find(deviceType, (D) this));
}
代码示例来源:origin: org.fourthline.cling/cling-core
protected Collection<D> find(DeviceType deviceType, D current) {
Collection<D> devices = new HashSet<>();
// Type might be null if we just discovered the device and it hasn't yet been hydrated
if (current.getType() != null && current.getType().implementsVersion(deviceType)) {
devices.add(current);
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
devices.addAll(find(deviceType, embeddedDevice));
}
}
return devices;
}
代码示例来源:origin: org.fourthline.cling/cling-core
protected D find(UDN udn, D current) {
if (current.getIdentity() != null && current.getIdentity().getUdn() != null) {
if (current.getIdentity().getUdn().equals(udn)) return current;
}
if (current.hasEmbeddedDevices()) {
for (D embeddedDevice : (D[]) current.getEmbeddedDevices()) {
D match;
if ((match = find(udn, embeddedDevice)) != null) return match;
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!