Package java.util

Examples of java.util.Vector.toArray()


      if (productVector == null)
          continue;

      String[] productNames =
          (String[])productVector.toArray(new String[0]);

      // Over all products under which there are
      // factories registered under this descriptor name
      for (k = 0; k < productNames.length; k++) {
View Full Code Here


        }

  if (v.size() <= 0)
      return null;

        return (String[])v.toArray(new String[0]);
    }

    /**
     * Return an array of <code>EnumeratedParameter</code> objects
     * corresponding to the parameter with the specified name.
View Full Code Here

                }
            }

            int tmpsize = temp.size();
            if ( tmpsize > 0 ) {
                tiles = (Raster[])temp.toArray(new Raster[tmpsize]);
            }
        }

        return tiles;
    }
View Full Code Here

    Vector vector = new Vector();
    for (int i = 0; i != templates.length; i++)
      if (templates[i].getContextTypeName().equals(fName))
        vector.add(templates[i]);

    return (Template[]) vector.toArray(new Template[vector.size()]);
  }

}
View Full Code Here

              }
            }
 
                      //new serviceID
            String[] actualServicesID = new String[vec.size()];
            actualServicesID = (String[]) vec.toArray(new String[]{});
 
                      //new serviceType
            String[] actualServiceType = new String[oldServiceType.length - 1];
            vec.clear();
            for (int i = 0; i < oldServiceType.length; i++) {
View Full Code Here

              if (!(oldServiceType[i].equals(parseUSN.getServiceType())))
                          {
                vec.add(oldServiceType[i]);
              }
            }
            actualServiceType = (String[]) vec.toArray(new String[]{});
 
                      //unrigistering and registering again with the new properties
            unregisterUPnPDevice(registar);
            device.setProperty(UPnPService.ID, actualServicesID);
            device.setProperty(UPnPService.TYPE, actualServiceType);
View Full Code Here

                IVResource[] more = r1.findChildren(childName);
                results.addAll(Arrays.asList(more));
            }

        }
        return (IVResource[]) results.toArray(new IVResource[results.size()]);

    }
}
View Full Code Here

      }catch (InstanceNotFoundException infe) { infe.printStackTrace(); // infe
      }catch (ReflectionException re) { re.printStackTrace(); // re
      }
    }
        }
  ons=v_unstartedBundle.toArray();
      }while ( oldUnstartedBundleNbr != ons.length );

    }catch (IOException ioe) { ioe.printStackTrace(); // ioe
    }
    a.firePropertyChangedEvent(Plugin.NEW_NODE_READY, connString, mbsc);
View Full Code Here

      }
      str_jmxsurl = bc.getProperty("mosgi.jmxconsole.id."+(++i)+".jmxsurl");
    }

    Gateway[] gateways=new Gateway[v_gateways.size()];
    v_gateways.toArray(gateways);
    return gateways;
  }

  // GUI gateway creator
  public static Gateway newGateway(Gateway ref) throws Exception {
View Full Code Here

                }
            }
        }
        if (imported.size() == 0)
            return null;
        else return (ExportedPackage[])imported.toArray(new ExportedPackage[imported.size()]);

    }
    public static Bundle[] getRequiringBundles(Bundle bundle, AgentContext ac) throws ServiceNotAvailableException{
        if (bundle==null) throw new IllegalArgumentException("Bundle argument should not be null");
        if (bundle.getSymbolicName()==null) return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.