Beispiel #1
0
 public void removeLightSource(LightSource source) {
   if (lightSourceList == null) {
     return;
   }
   for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
     AttachedLightSource als = i.next();
     if (als != null
         && als.getLightSourceId() != null
         && als.getLightSourceId().equals(source.getId())) {
       i.remove();
     }
   }
 }
Beispiel #2
0
 public boolean hasLightSource(LightSource source) {
   if (lightSourceList == null) {
     return false;
   }
   for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
     AttachedLightSource als = i.next();
     if (als != null
         && als.getLightSourceId() != null
         && als.getLightSourceId().equals(source.getId())) {
       return true;
     }
   }
   return false;
 }