Package java.util

Examples of java.util.Set


    return mapping.findForward(FORWARD_final);
  }

  public QuestionList setLinksfunction(QuestionList DL)
  {
    Set listkey = DL.keySet();
    Iterator it = listkey.iterator();

    while (it.hasNext())
    {
      try
      {
View Full Code Here


      }

      int attendeeSize = userIdNames.size();
      int userId[] = new int[attendeeSize];

      Set availElement = userIdNames.keySet();
      Iterator userID = availElement.iterator();
      int toArr = 0;

      while (userID.hasNext()) {
        userId[toArr] = ((Integer)userID.next()).intValue();
        toArr++;
      }

      try {
        CvCalendarHome ch = (CvCalendarHome)CVUtility.getHomeObject(
            "com.centraview.calendar.CvCalendarHome", "CvCalendar");
        CvCalendar cr = ch.create();
        cr.setDataSource(dataSource);
        userActivities = cr.getAvailibility(1, userId, startDate, endDate);
      } catch (Exception e) {
        logger.error("[execute]: Exception", e);
      }

      // check for the users in the hashmap and get the vector of activities
      Set setElement = userActivities.keySet();
      Iterator allUsers = setElement.iterator();

      // check for all users
      while (allUsers.hasNext()) {
        // get user id
        Integer user = (Integer)allUsers.next();
View Full Code Here

      // get the user's list of folders for this account
      HashMap folderList = remote.getFolderList(accountID.intValue());

      // remove the "root" folder from the list
      Set keySet = folderList.keySet();
      Iterator iter = keySet.iterator();
      while (iter.hasNext()) {
        Number key = (Number)iter.next();
        String value = (String)folderList.get(key);
        if (value.equals("root")) {
          iter.remove();
View Full Code Here

  abstract void calculate();
 

  public int getMaxLineId()
  {
    Set s = this.keySet();
    Iterator itr = s.iterator();
    int maxId =0;
    while (itr.hasNext())
    {
      AccountingLineElement ale = (AccountingLineElement) this.get(itr.next());
      int currid = ale.getElementId();
View Full Code Here

  }//getMaxLineId

  public void sort()
  {
    TreeMap tmp = new TreeMap();
    Set s = this.keySet();
    Iterator itr = s.iterator();
    String sortMember = this.getSortMember();
    AccountingLineElement curr = null;
    while(itr.hasNext())
    {
      try
View Full Code Here

    GetWeatherByZipCode zipCode = res.addNewGetWeatherByZipCode();
    zipCode.setZipCode("one");
    TestObject to2 = mapper.map(res, TestObject.class);
    assertEquals(res.getGetWeatherByZipCode().getZipCode(), to2.getOne());

    Set set = new HashSet();
    AnotherTestObject ato = new AnotherTestObject();
    ato.setDay("day");
    set.add(ato);
    to.setSetToArray(set);

    AnotherTestObject ato2 = new AnotherTestObject();
    ato2.setDay("day");
    to.addAnotherTestObject(ato2);
View Full Code Here

    public Set convertTo(Set source, Set destination) {
      return convert(source, destination);
    }

    private Set convert(Set source, Set destination) {
      Set result = new HashSet();
      for (Object object : source) {
        if (object instanceof BidirectionalManyConvert) {
          result.add(mapper.map(object, BidirectionalMany.class));

        } else {
          result.add(mapper.map(object, BidirectionalManyConvert.class));
        }
      }
      return result;
    }
View Full Code Here

        List resources = new ArrayList();

        MBeanServer server = getMBeanServer();
        if (server != null) {
            try {
                Set dsNames = server.queryNames(new ObjectName("jboss.jca:service=ManagedConnectionPool,*"), null);
                for (Iterator it = dsNames.iterator(); it.hasNext();) {
                    ObjectName managedConnectionPoolOName = (ObjectName) it.next();

                    ApplicationResource resource = new ApplicationResource();
                    resource.setName(managedConnectionPoolOName.getKeyProperty("name"));
                    resource.setType("jboss");
View Full Code Here

        //
        // should be just one set, this is just to find out if this instance
        // is cluster-enabled and the cluster supports JMX
        //
        Set clusters = mBeanServer.queryMBeans(new ObjectName("*:type=Cluster,host=" + hostName), null);
        Set membership = mBeanServer.queryMBeans(membershipOName, null);
        if (clusters != null && clusters.size() > 0 && membership != null && membership.size() > 0) {
            ObjectName clusterOName = ((ObjectInstance) clusters.iterator().next()).getObjectName();
            cluster = new Cluster();

            cluster.setName(JmxTools.getStringAttr(mBeanServer, clusterOName, "clusterName"));
            cluster.setInfo(JmxTools.getStringAttr(mBeanServer, clusterOName, "info"));
View Full Code Here

    this.principal = userName;
  }

  private String getPrincipal() {
    // Retrieve the principal (members of the Group.class)   
    Set principals = subject.getPrincipals(Principal.class);
    Iterator iterator = principals.iterator();
    while (iterator.hasNext()) {
      Principal principal = (Principal) iterator.next();
      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "getPrincipal class = " + principal.getClass().getName());
      // Signed group (empty group that contains a signature)?
View Full Code Here

TOP

Related Classes of java.util.Set

Copyright © 2018 www.massapicom. 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.