Package java.util

Examples of java.util.BitSet.cardinality()


                    Configs.set(k);
                }
                k++;
            }
        }
        this.mrbConfig = new byte[Configs.cardinality()];
        int nBit = 0;
        for (int nConfig = 0;
        -1 != (nConfig = Configs.nextSetBit(nConfig));
        nConfig++) {
          this.mrbConfig[nBit++] = (byte) nConfig;
View Full Code Here


        else
        {
          bs.clear(doc);
        }
      }
      if (bs.cardinality()>0)
      {
        fail("failed: leftover cardinatity: "+bs.cardinality());
      }
    }
    catch(Exception e)
View Full Code Here

          bs.clear(doc);
        }
      }
      if (bs.cardinality()>0)
      {
        fail("failed: leftover cardinatity: "+bs.cardinality());
      }
    }
    catch(Exception e)
    {
      fail(e.getMessage());
View Full Code Here

        }
      } else {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent)event;
        BitSet selection = tmse.getSelection();
        //delete all users from the selected dates
        if(tmse.getAction().equals(DENListTableDataModel.DELETE_ACTION) && selection.cardinality() > 0) {
          removed = denManager.getSelectedEventParticipants(dateList, selection);
          dateList = denManager.deleteParticipants(ores, courseNode, denManager.getSelectedEventIDs(dateList, selection));
          listTableData.setObjects(dateList);
          //send notification mail
          createRemovedNotificationMail(ureq, dateList.get(0).getSubject());
View Full Code Here

          removed = denManager.getSelectedEventParticipants(dateList, selection);
          dateList = denManager.deleteParticipants(ores, courseNode, denManager.getSelectedEventIDs(dateList, selection));
          listTableData.setObjects(dateList);
          //send notification mail
          createRemovedNotificationMail(ureq, dateList.get(0).getSubject());
        } else if(tmse.getAction().equals(DENListTableDataModel.MAIL_ACTION) && selection.cardinality() > 0) {
          //send email to all users from the selected dates
          List<Identity> participants = denManager.getSelectedEventParticipants(dateList, selection);
          createParticipantsMail(ureq, participants);
        } else if(selection.cardinality() == 0) {
          getWindowControl().setWarning(translate("participants.message.empty"));
View Full Code Here

          createRemovedNotificationMail(ureq, dateList.get(0).getSubject());
        } else if(tmse.getAction().equals(DENListTableDataModel.MAIL_ACTION) && selection.cardinality() > 0) {
          //send email to all users from the selected dates
          List<Identity> participants = denManager.getSelectedEventParticipants(dateList, selection);
          createParticipantsMail(ureq, participants);
        } else if(selection.cardinality() == 0) {
          getWindowControl().setWarning(translate("participants.message.empty"));
        }
      }
    } else if(source == formManageParticipants && event == DENManageParticipantsForm.ADD_PARTICIPANTS) {
      //open user search controller to manually add users in date
View Full Code Here

  @Test(timeout = 10000)
  public final void testRand() {

    BitSet gotcha = new BitSet(5);
    gotcha.set(0);
    assertThat(gotcha.cardinality(), is(1));
    gotcha.set(2);
    assertThat(gotcha.cardinality(), is(2));
    gotcha.set(1);
    assertThat(gotcha.cardinality(), is(3));
    gotcha.set(3);
View Full Code Here

    BitSet gotcha = new BitSet(5);
    gotcha.set(0);
    assertThat(gotcha.cardinality(), is(1));
    gotcha.set(2);
    assertThat(gotcha.cardinality(), is(2));
    gotcha.set(1);
    assertThat(gotcha.cardinality(), is(3));
    gotcha.set(3);
    assertThat(gotcha.cardinality(), is(4));
    gotcha.set(4);
View Full Code Here

    gotcha.set(0);
    assertThat(gotcha.cardinality(), is(1));
    gotcha.set(2);
    assertThat(gotcha.cardinality(), is(2));
    gotcha.set(1);
    assertThat(gotcha.cardinality(), is(3));
    gotcha.set(3);
    assertThat(gotcha.cardinality(), is(4));
    gotcha.set(4);
    assertThat(gotcha.cardinality(), is(5));
View Full Code Here

    gotcha.set(2);
    assertThat(gotcha.cardinality(), is(2));
    gotcha.set(1);
    assertThat(gotcha.cardinality(), is(3));
    gotcha.set(3);
    assertThat(gotcha.cardinality(), is(4));
    gotcha.set(4);
    assertThat(gotcha.cardinality(), is(5));

    gotcha = new BitSet(5);
    int val;
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.