Package java.util

Examples of java.util.HashSet


      if ( args.size() > 1 ){
       
        AzureusCoreStats.setEnableAverages(((String)args.get(1)).equalsIgnoreCase( "on" ));
      }
     
      java.util.Set  types = new HashSet();
     
      types.add( pattern );
     
      Map  reply = AzureusCoreStats.getStats( types );
     
      Iterator  it = reply.entrySet().iterator();
     
View Full Code Here


  public IConsoleCommand(String main_name) {
    this(main_name, null);
  }
 
  public IConsoleCommand(String main_name, String short_name) {
    this.commands = new HashSet();
    this.main_name = main_name;
    this.short_name = short_name;
   
    if (main_name != null)  {commands.add(main_name);}
    if (short_name != null) {commands.add(short_name);}
View Full Code Here

            Integer pageInteger = new Integer(pageNumber);
            Set set = (Set) pageMap.get(pageInteger);
           
            if (set == null) {
                set = new HashSet();
                pageMap.put(pageInteger, set);
            }
           
            set.add(cell);
           
View Full Code Here

           
            if (!proc.isProcedureRelational()) {
                continue;
            }

            HashSet inputSymbols = new HashSet();
            List inputReferences = new LinkedList();
           
            PlanNode critNode = node.getParent();
           
            List conjuncts = new LinkedList();
            HashSet coveredParams = new HashSet();
            //List preExecNodes = new LinkedList();
                       
            for (Iterator params = proc.getInputParameters().iterator(); params.hasNext();) {
                SPParameter param = (SPParameter)params.next();
                ElementSymbol symbol = param.getParameterSymbol();
                Expression input = param.getExpression();
                inputReferences.add(input);
                inputSymbols.add(symbol);
            }
           
            findInputNodes(inputSymbols, critNode, conjuncts, coveredParams);
           
            List defaults = new LinkedList();
           
            for (Iterator params = inputReferences.iterator(); params.hasNext();) {
                Reference ref = (Reference)params.next();
                ElementSymbol symbol = ref.getExpression();
               
                Expression defaultValue = null;
               
                /*try {
                    defaultValue = ResolverUtil.getDefault(symbol, metadata);
                } catch (QueryResolverException qre) {
                    //Just ignore
                }*/
               
                defaults.add(defaultValue);
               
                if (defaultValue == null && !coveredParams.contains(symbol)) {
                    throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanProcedures.no_values", symbol)); //$NON-NLS-1$
                }
            }
           
            /*if (conjuncts.isEmpty()) {
View Full Code Here

      Principal p = Mockito.mock(Principal.class);
      Mockito.stub(p.getName()).toReturn("alreadylogged"); //$NON-NLS-1$
      HashSet<Principal> principals = new HashSet<Principal>();
      principals.add(p);
     
      Subject subject = new Subject(false, principals, new HashSet(), new HashSet());
      SecurityHelper sh = Mockito.mock(SecurityHelper.class);
      Mockito.stub(sh.getSubjectInContext("passthrough")).toReturn(subject); //$NON-NLS-1$
     
        TeiidLoginContext membershipService = new TeiidLoginContext(sh) {
      public LoginContext createLoginContext(String domain, CallbackHandler handler) throws LoginException {
View Full Code Here

   
    public void testProcessWithOccasionalBlocks() throws Exception {
        List elements = new ArrayList();
        elements.add(new ElementSymbol("a")); //$NON-NLS-1$
               
        HashSet blocked = new HashSet(Arrays.asList(new Integer[] { new Integer(0), new Integer(2), new Integer(7) }));
        int numBatches = 10;
        int batchRow = 1;       
        int rowsPerBatch = 50;
        List[] expectedResults = new List[rowsPerBatch*(numBatches-blocked.size())];
        List batches = new ArrayList();
        for(int b=0; b<numBatches; b++) {
            if(blocked.contains(new Integer(b))) {
                batches.add(BlockedException.INSTANCE);
            } else {   
                List[] rows = new List[rowsPerBatch];
                for(int i=0; i<rowsPerBatch; i++) {
                    rows[i] = new ArrayList();
View Full Code Here

    {
      try {
        int telnetPort = COConfigurationManager.getIntParameter("Telnet_iPort", 57006);
        String allowedHostsStr = COConfigurationManager.getStringParameter("Telnet_sAllowedHosts", "127.0.0.1,titan");       
        StringTokenizer st = new StringTokenizer(allowedHostsStr, ",");
        Set allowedHosts = new HashSet();
        while( st.hasMoreTokens() )
          allowedHosts.add(st.nextToken().toLowerCase());
        int maxLoginAttempts = COConfigurationManager.getIntParameter("Telnet_iMaxLoginAttempts", 3);
        userManager = initUserManager();
        Thread thread = new Thread(new SocketServer(this, telnetPort, allowedHosts, userManager, maxLoginAttempts), "Telnet Socket Server Thread");
        thread.setDaemon(true);
        thread.start();
View Full Code Here

  protected void
  registerAlertHandler()
  {
    org.gudy.azureus2.core3.logging.Logger.addListener(new ILogAlertListener() {
      private java.util.Set  history = Collections.synchronizedSet( new HashSet());
     
      public void alertRaised(LogAlert alert) {
        if (!alert.repeatable) {
          if ( history.contains( alert.text )){
           
View Full Code Here

      assert !set1.equals(set2);
      assert !set2.equals(set1);

      assert set1.equals(set1);
      assert !set1.equals(null);
      assert !set1.equals(new HashSet());
   }
View Full Code Here

      return version;
   }

   public Set getChildrenDirect()
   {
      return new HashSet(children.values());
   }
View Full Code Here

TOP

Related Classes of java.util.HashSet

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.