Package java.util

Examples of java.util.Set


        map.put("Two", "Two");
        map.put(null, "Three");
        assertEquals("Three", (String) map.get(null));
        map.put(null, "Four");
        assertEquals("Four", (String) map.get(null));
        Set keys = map.keySet();
        assertTrue(keys.contains("one"));
        assertTrue(keys.contains("two"));
        assertTrue(keys.contains(null));
        assertTrue(keys.size() == 3);
    }
View Full Code Here


        map.put("one", "Three");
        map.put(null, "Four");
        map.put(new Integer(20), "Five");
        Map caseInsensitiveMap = new CaseInsensitiveMap(map);
        assertTrue(caseInsensitiveMap.size() == 4); // ones collapsed
        Set keys = caseInsensitiveMap.keySet();
        assertTrue(keys.contains("one"));
        assertTrue(keys.contains("two"));
        assertTrue(keys.contains(null));
        assertTrue(keys.contains(Integer.toString(20)));
        assertTrue(keys.size() == 4);
        assertTrue(!caseInsensitiveMap.containsValue("One")
            || !caseInsensitiveMap.containsValue("Three")); // ones collaped
        assertEquals(caseInsensitiveMap.get(null), "Four");
    }
View Full Code Here

  abstract public 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

      DL.setTotalNoOfRecords( DL.size() );

      System.out.println("san-OrderLookupHandler-got the DL, size = "+DL.size());

      Set listkey = DL.keySet();
      Iterator it =  listkey.iterator();
      /*while( it.hasNext() )
      {
        String str = ( String )it.next();
        System.out.println(str);
        StringMember sm=null;
View Full Code Here

    int id = Integer.parseInt( accountid );

    /** code added for query change **/
    FolderList fl = ( FolderList )session.getAttribute("folderlist");
    Set listkey = fl.keySet();
    Iterator it = listkey.iterator();
    int accountID;
    AccountDetail ad1 = null;
    while(it.hasNext())
    {
      ad1 =(AccountDetail)fl.get(it.next());
View Full Code Here

  @ uses
  This function sets links on members
  */
  public void setLinks(DisplayList DL )
  {
     Set listkey = DL.keySet();
     Iterator it =  listkey.iterator();
        while( it.hasNext() )
         {
       String str = ( String )it.next();
      StringMember sm=null;
          ListElement ele  = ( ListElement )DL.get( str );
View Full Code Here

  public InvoiceList setLinksfunction(InvoiceList DL)
  {

    String url = "";

    Set listkey = DL.keySet();
    Iterator it = listkey.iterator();
    while (it.hasNext())
    {
      try
      {
        String str = (String)it.next();
View Full Code Here

      // BY *ANY* HANDLER, WHEN WE *ALREADY HAVE* THE KEY TO THE MESSAGE?!??!
      // I'VE INTRODUCED A HACK HERE, TO ACCOUNT FOR CASES IN WHICH WE'RE TRYING
      // TO VIEW A MESSAGE DETAILS, BUT WE HAVEN'T COME FROM THE EMAIL LIST SCREEN.
      if (displaylistSession != null && (displaylistSession.getListType()).equals("Email"))
      {
        Set listkey = displaylistSession.keySet();
        Iterator it = listkey.iterator();

        while (it.hasNext())
        {
          index++;
          String str = (String)it.next();
View Full Code Here

    if (listType.equals("individual")) {

      IndividualList DL = lg.getIndividualList(individualID, 1, 0, "", "Name", dbID);

      DL.setTotalNoOfRecords(DL.size());
      Set s = DL.keySet();
      Iterator it = s.iterator();
      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
        IntMember smid = (IntMember)ile.get("IndividualID");
        int id = new Integer(smid.getMemberValue().toString()).intValue();
        // attendeeList.addElement(new DDNameValue(id,name));
        attendeeList.addElement(new DDNameValue("" + id + "#" + name, name));
      }
      put("attendee", attendeeList);
    } else if (listType.equals("allindividual")) {
      IndividualList DL = lg.getIndividualList(individualID, 0, 0, "", "Name");
      DL.setTotalNoOfRecords(DL.size());
      Set s = DL.keySet();
      Iterator it = s.iterator();
      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
View Full Code Here

TOP

Related Classes of java.util.Set

Copyright © 2015 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.