public void testOne() {
    LinkedList<Assertion> asserts = new LinkedList();
    asserts.add(Assertion.create("John lives around here."));

    PuzzleSolver testS = new PuzzleSolver(asserts);
    LinkedList<String> names = testS.getNames();
    LinkedList<String> occupations = testS.getOccupations();
    LinkedList<String> colors = testS.getColors();

    assertEquals("[John]", names.toString());
    assertEquals("[#u]", occupations.toString());
    assertEquals("[#u]", colors.toString());
  }
  public void testSpecial() {
    LinkedList<Assertion> asserts = new LinkedList();
    asserts.add(Assertion.create("John lives around here."));
    asserts.add(Assertion.create("Mary lives around here."));
    asserts.add(Assertion.create("The plumber lives in the yellow house."));

    PuzzleSolver testS = new PuzzleSolver(asserts);
    LinkedList<String> names = testS.getNames();
    LinkedList<String> occupations = testS.getOccupations();
    LinkedList<String> colors = testS.getColors();

    assertEquals("[John, Mary]", names.toString());
    assertEquals("[plumber, #u]", occupations.toString());
    assertEquals("[yellow, #u]", colors.toString());
  }
  @Test
  public void test12() throws Throwable {
    fr.inria.diversify.sosie.logger.LogWriter.writeTestStart(
        969, "org.apache.commons.collections4.collection.IndexedCollectionEvoSuiteTest.test12");
    LinkedList<Object> linkedList0 = new LinkedList<Object>();
    ConstantTransformer<Object, String> constantTransformer0 =
        new ConstantTransformer<Object, String>("E$owUEF.Y7");
    MultiValueMap<String, Object> multiValueMap0 = new MultiValueMap<String, Object>();
    LinkedList<String> linkedList1 = new LinkedList<String>();
    linkedList0.add((Object) "E$owUEF.Y7");
    IndexedCollection<String, Object> indexedCollection0 =
        new IndexedCollection<String, Object>(
            (Collection<Object>) linkedList0,
            (Transformer<Object, String>) constantTransformer0,
            (MultiMap<String, Object>) multiValueMap0,
            true);
    linkedList1.toString();
    // Undeclared exception!
    try {
      indexedCollection0.add((Object) "[]");
      fail("Expecting exception: IllegalArgumentException");

    } catch (IllegalArgumentException e) {
      //
      // Duplicate key in uniquely indexed collection.
      //
    }
  }
Example #4
0
  /**
   * Called from bicat.gui.window.GenePairAnalysis
   *
   * @throws Exception
   */
  public void genePairAnalysis(
      int data, int list, int idx, int minCoocScore, int minCommonScore, boolean byCooc)
      throws Exception {

    Dataset BcR = (Dataset) engine.getDatasetList().get(data);
    LinkedList biclusterList = (LinkedList) BcR.getBCsList(list).get(idx);

    HashMap gpa = new HashMap();

    if (engine.isDebug()) {
      System.out.println("Starting gene pair analysis ...");
      System.out.println("Hashmap for biclusterList: " + biclusterList.toString());
    }

    if (byCooc) gpa = gpaByCoocurrence(biclusterList, minCoocScore, BcR);
    else gpa = gpaByCommonChips(biclusterList, minCommonScore);

    if (engine.isDebug()) System.out.println("Hashmap size for gpa: " + gpa.size());
    // do management ...
    BcR.updateAnalysisBiclustersLists(gpa, list, idx);

    if (owner != null) {
      owner.updateAnalysisMenu();
      owner.buildTree();

      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      int row = owner.getTree().getRowCount() - 1;
      while (row >= 0) {
        owner.getTree().collapseRow(row);
        row--;
      }
    }
  }
 /**
  * Calculate largest prime factor.
  *
  * @return the largest prime factor
  */
 public int getLargestPrimeFactor() {
   int divider = PrimeChecker.FIRST_PRIME;
   double divideIt = this.divideIt;
   this.factors.addLast(PrimeChecker.FIRST_PRIME);
   while (divideIt > 1) {
     if (String.valueOf(divideIt).endsWith(String.valueOf(PrimeChecker.END_PRIME))) {
       divider = PrimeChecker.END_PRIME;
       divideIt = divideIt / divider;
     } else {
       boolean hasNext = false;
       for (final int prime : this.factors) {
         if (divideIt % prime == 0) {
           divider = prime;
           hasNext = true;
           break;
         }
       }
       if (!hasNext) {
         while (divideIt % divider == 0) {
           this.factors.addLast(divider);
           divider = PrimeChecker.getNextPrime(this.factors);
         }
         hasNext = false;
       }
     }
     divideIt = divideIt / divider;
     if (!factors.contains(divider)) {
       factors.add(divider);
     }
   }
   System.out.println("processed primes : " + factors.toString());
   return factors.getLast();
 }
 public static void main(String[] args) {
   MySQLDatabase mysql = new MySQLDatabase();
   LinkedList<DataPoint> res = mysql.query("select * from Wordcount where id = 4");
   for (int i = 0; i < res.size(); i++) {
     System.out.println(res.toString());
   }
   mysql.close();
 }
Example #7
0
 @Override
 public String toString() {
   if (!list.isEmpty()) {
     return "Word [word=" + word + ", list=" + list.toString() + "]";
   } else {
     return "[word=" + word + " logFreqNormalized=" + logFreqNormalized + "]";
   }
 }
    /**
     * Add a filter class.
     *
     * <p>Adding a filter class DOES NOT reset the servlet or filter classes. Filter will be
     * instantiated without initialization parameters.
     *
     * @param filterClass filter class. Must not be {@code null}.
     * @param filterName filter name. Must not be {@code null} or empty string.
     * @param initParams filter init parameters. Must not be {@code null}.
     * @param dispatcherTypes filter will be registered for these dispatcher types. Must not be
     *     {@code null}.
     * @return this servlet deployment context builder.
     * @throws java.lang.NullPointerException if {@code filterClass} or {@code filterName} or {@code
     *     initParams} or {@code dispatcherTypes} is {@code null}.
     * @throws java.lang.IllegalArgumentException in case the {@code filterName} or {@code
     *     dispatcherTypes} is empty.
     */
    public Builder addFilter(
        Class<? extends Filter> filterClass,
        String filterName,
        Map<String, String> initParams,
        Set<DispatcherType> dispatcherTypes) {
      if (this.filters == null) {
        this.filters = new ArrayList<>();
      }

      final LinkedList<String> nulls = new LinkedList<>();
      final LinkedList<String> empties = new LinkedList<>();
      if (filterClass == null) {
        nulls.add("filter class");
      }
      if ((filterName == null)) {
        nulls.add("filter name");
      } else if (filterName.isEmpty()) {
        empties.add("filter name");
      }
      if (initParams == null) {
        nulls.add("init parameters");
      }
      if (dispatcherTypes == null) {
        nulls.add("dispatcher types");
      } else if (dispatcherTypes.isEmpty()) {
        empties.add("dispatcher types");
      }

      if (!nulls.isEmpty()) {
        throw new NullPointerException(String.format("The %s must not be null.", nulls.toString()));
      }
      if (!empties.isEmpty()) {
        throw new IllegalArgumentException(
            String.format("The %s must not be empty.", empties.toString()));
      }

      this.filters.add(new FilterDescriptor(filterName, filterClass, initParams, dispatcherTypes));
      return this;
    }
  private void generateExpressions(LinkedList<String> val, int[] loc) {
    String[] ops = {"+", "-", "*", "/"};

    for (int i = 0; i < ops.length; i++)
      for (int j = 0; j < ops.length; j++)
        for (int k = 0; k < ops.length; k++) {
          LinkedList<String> rslt = new LinkedList<String>(val);
          rslt.add(loc[0], ops[i]);
          rslt.add(loc[1], ops[j]);
          rslt.add(loc[2], ops[k]);

          expressions.add(rslt);

          System.out.println(rslt.toString());
        }
  }
 @Test
 public void test8() throws Throwable {
   fr.inria.diversify.sosie.logger.LogWriter.writeTestStart(
       976, "org.apache.commons.collections4.collection.IndexedCollectionEvoSuiteTest.test8");
   LinkedList<LinkedList<Integer>> linkedList0 = new LinkedList<LinkedList<Integer>>();
   Class<Integer>[] classArray0 = (Class<Integer>[]) Array.newInstance(Class.class, 3);
   InvokerTransformer<LinkedList<Integer>, String> invokerTransformer0 =
       new InvokerTransformer<LinkedList<Integer>, String>(
           "GGIU}v``Jm;p}\"/0", (Class<?>[]) classArray0, (Object[]) classArray0);
   IndexedCollection<String, LinkedList<Integer>> indexedCollection0 =
       IndexedCollection.uniqueIndexedCollection(
           (Collection<LinkedList<Integer>>) linkedList0,
           (Transformer<LinkedList<Integer>, String>) invokerTransformer0);
   LinkedList<String> linkedList1 = new LinkedList<String>();
   linkedList1.toString();
   boolean boolean0 = indexedCollection0.remove((Object) "[]");
   assertEquals(false, boolean0);
 }
 private static boolean undoEvents(
     LookupImpl lookup, @NotNull final LinkedList<EditorChangeAction> events) {
   AccessToken token = WriteAction.start();
   try {
     return lookup.performGuardedChange(
         new Runnable() {
           @Override
           public void run() {
             for (EditorChangeAction event : events) {
               event.performUndo();
             }
           }
         },
         events.toString());
   } finally {
     token.finish();
   }
 }
  /**
   * *************************************************************** Description: 讀取檔案且parser檔案
   * Parameters: File FileName Return: void Created Date: 2014/03/16
   * ****************************************************************
   */
  public void loadfile(File FileName) {

    // 使用try...catch...做找不到檔案或是存取錯誤例外的處理
    try (FileReader fr = new FileReader(FileName)) {
      // 讀取檔案裡面的內容至buuferedreader中
      BufferedReader br = new BufferedReader(fr);
      // parser檔案的內容, 當檔案裡有內容尚未被讀出十此while迴圈會繼續執行, 且將讀出的值放入LinkedList中
      stoken = new StringTokenizer(br.readLine(), " ");
      while (stoken.hasMoreTokens()) {
        linkedlist.add(stoken.nextToken());
      }
      // 將LinkedList的內容轉為字串放入pid此字串中
      pid = linkedlist.toString();
    } catch (FileNotFoundException e) {
      System.out.println("例外發生:找不到該檔案");
    } catch (final IOException e) {
      System.out.println("例外發生:檔案存取錯誤");
    }
  }
Example #13
0
  public String evaluate(String expString) {
    try {
      ArrayList<Token> tokens = _tokenizer.tokenize(expString);

      LinkedList<String> lst = new LinkedList<>();
      tokens
          .stream()
          .forEach(
              (t) -> {
                lst.add((new Pair<>(t.Literal(), t.Token())).toString());
              });

      Expression exp = _parser.parse(tokens);
      ArrayList<Integer> lst2 = exp.evaluate();

      return lst.toString() + "\n" + lst2.toString();
    } catch (Tokenizer.TokenizerException exception) {
      return "String can't be parsed.";
    }
  }
Example #14
0
  @POST
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces(MediaType.APPLICATION_JSON)
  public String postFizzBuzz(String stringObject) {
    JSONObject jsonObject = new JSONObject(stringObject);
    String from = jsonObject.getString("from");
    String to = jsonObject.getString("to");
    String retour = "{\"resultats\":[]}";
    LinkedList<String> listefizzbuzz = new LinkedList<>();
    if (!"NoN".equals(to)) {
      int started = Integer.parseInt(from);
      int ended = Integer.parseInt(to);
      if (Math.abs(ended) >= Math.abs(started)) {
        for (int i = Math.abs(started); i <= Math.abs(ended); i++) {

          listefizzbuzz.add("\"" + matchFizzBuzz(i) + "\"");
        }
        retour = "{\"resultats\":" + listefizzbuzz.toString() + "}";
      }
    }

    return retour;
  }
  @Override
  public void sendRequest(
      final Context context,
      final URLConnection connection,
      final RequestDescription requestDescription)
      throws IOException {
    final LinkedList<ParameterValue> parameters = new LinkedList<ParameterValue>();
    for (final Parameter p : requestDescription.getSimpleParameters().getChildren()) {
      if (p instanceof ParameterValue) {
        parameters.add((ParameterValue) p);
      }
    }
    final String encoding = requestDescription.getEncoding().name();
    final byte[] content = URLEncodedUtils.format(parameters, encoding).getBytes(encoding);

    final OutputStream stream = connection.getOutputStream();
    stream.write(content);
    stream.flush();

    if (DEBUG) {
      Log.d(TAG, "(" + requestDescription.getId() + ")" + ": " + parameters.toString());
    }
  }
Example #16
0
 @Override
 public String toString() {
   return groupOrder.toString();
 }
 /**
  * *************************************************************** Description: dispatch queue
  * Parameters: void Return: void Created Date: 2014/03/16
  * ****************************************************************
  */
 public void dispatch() {
   linkedlist.removeFirst(); // queue為FIFO, 故會先remove queue head
   pid = linkedlist.toString(); // 將LinkedList的內容轉為字串放入pid此字串中
 }
Example #18
0
 @Override
 public String toString() {
   return list.toString();
 }
  /** @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */
  protected void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    System.out.println("Reached Product catalog Servlet");
    // TODO Auto-generated method stub
    PrintWriter out = response.getWriter();

    String memberId2 = (String) request.getParameter("memberId");
    System.out.println("memberID:" + memberId2);
    //		HttpSession session = request.getSession(true);
    //		if(session!=null)
    Connection con = null;
    ArrayList<LinkedList<String>> dataList = new ArrayList<LinkedList<String>>();
    String Items = "";
    try {

      con = pool.getConnection();
      String query = "select pdId,pname,pdesc,price,qty,image from bmps_product";
      PreparedStatement pstmt = con.prepareStatement(query);
      System.out.println("sql is " + query);

      ResultSet rs = pstmt.executeQuery();

      rs = pstmt.getResultSet();
      while (rs.next()) {

        // Add records into data list

        LinkedList<String> rows = new LinkedList<String>();

        rows.add(rs.getString("pdId"));
        rows.add(rs.getString("pname"));
        rows.add(rs.getString("pdesc"));
        rows.add(rs.getString("Price"));
        rows.add(rs.getString("qty"));
        String abc = rs.getString("image");
        rows.add(abc);
        dataList.add(rows);
        System.out.println(rows.toString());
      }
      rs.close();
      pstmt.close();
    } catch (Exception e) {
      System.out.println("Exception is ;" + e);
    }

    //					 request.setAttribute("memberId", memberId);

    for (LinkedList<String> list : dataList) {

      while (!list.isEmpty()) {
        Items +=
            list.poll()
                + "|"
                + list.poll()
                + "|"
                + list.poll()
                + "|"
                + list.poll()
                + "|"
                + list.poll()
                + "|"
                + list.poll()
                + "%";
      }
    }

    System.out.println(Items.toString());

    out.print(Items);

    //			      request.setAttribute("data",dataList);
    //					 request.setAttribute("memberId", memberId);

    //			      request.getParameter(getServletInfo().)

    //			  dataList.equals(request);

    // System.out.println("This is the memberId" + q);

    // Dispatching request
    // String URL= " /Eshop.jsp";
    //			      RequestDispatcher dispatcher = request.getRequestDispatcher("Eshop.jsp");
    //			      if (dispatcher != null){
    //			        dispatcher.forward(request, response);
  }
 /**
  * *************************************************************** Description: add PCB to queue
  * Parameters: String New_PCB Return: void Created Date: 2014/03/16
  * ****************************************************************
  */
 public void add(String New_PCB) {
   linkedlist.add(New_PCB); // 將從GUI輸入的值加入至LinkedList中
   pid = linkedlist.toString(); // 將LinkedList的內容轉為字串放入pid此字串中
 }
Example #21
0
 public String toString() {
   // return op + fields.toString() + " " + comment;
   return op + fields.toString();
 }
 /**
  * returns the string signature of the neighboor list
  *
  * @return the string signature
  */
 public String toString() {
   return neighboorList.toString();
 }
 public String toString() {
   return "GraphPath(" + states.toString() + ")";
 }
Example #24
0
  public String toSparc() {
    if (op == Operator.COMP) {
      fields.removeLast();
    } else if (op == Operator.CALL) {
      return getSparc(op)
          + "\t"
          + fields.toString().replace("[", " ").replace("]", "\t")
          + "\n\t"
          + "nop";
    } else if (op == Operator.MOVEQ
        || op == Operator.MOVLT
        || op == Operator.MOVGT
        || op == Operator.MOVNE
        || op == Operator.MOVLE
        || op == Operator.MOVGE) {
      return getSparc(op)
          + "\t"
          + fields.toString().replace("[", " ").replace("]", "\t")
          + " "
          + comment;
    } else if (op == Operator.CBREQ
        || op == Operator.CBRGE
        || op == Operator.CBRGT
        || op == Operator.CBRLE
        || op == Operator.CBRLT
        || op == Operator.CBRNE) {
      InstrField otherBranch = fields.removeLast();
      fields.removeFirst();
      return getSparc(op)
          + "\t"
          + fields.toString().replace("[", " ").replace("]", "\t")
          + " "
          + comment
          + "\n\t"
          + SparcOperator.nop
          + "\n\t"
          + SparcOperator.ba
          + "\t"
          + otherBranch
          + " "
          + comment
          + "\n\t"
          + SparcOperator.nop;
    } else if (op == Operator.NEW) {
      return getSparc(Operator.CALL) + "\t" + "malloc, 0" + "\n\t" + "nop" + " " + comment;
    } else if (op == Operator.DEL) {
      return getSparc(Operator.CALL) + "\t" + "free, 0" + "\n\t" + "nop" + " " + comment;
    } else if (op == Operator.LOADI) {
      return "set" + "\t" + fields.toString().replace("[", " ").replace("]", "\t") + " " + comment;
    } else if (op == Operator.LOADAI) {
      InstrField srcReg = fields.removeFirst();
      InstrField offsetReg = fields.removeFirst();
      InstrField destReg = getDestinationRegister();
      return getSparc(op) + "\t" + "[" + srcReg + " + " + offsetReg + "], " + destReg;
    } else if (op == Operator.STOREAI) {
      InstrField srcReg = fields.removeFirst();
      InstrField destReg = fields.removeFirst();
      InstrField offsetReg = getDestinationRegister();
      return getSparc(op) + "\t" + srcReg + ", [" + destReg + " + " + offsetReg + "]";
    } else if (op == Operator.LABEL) {
      return "";
    } else if (op == Operator.SAVE) {
      // activation record = 88 bytes + locals
      return getSparc(op) + "\t" + "%sp, -800, %sp " + comment;
    } else if (op == Operator.RET) {
      return getSparc(op) + "\n\t" + "restore";
    } else if (op == Operator.PRINT) {
      String setUpper, setLower, prepCall, callScan;

      // get registers from allocator
      setUpper = "sethi" + "\t" + "%hi(.EV1LPR), %g1" + "\n";
      setLower = "\t" + "or" + "\t" + "%g1, %lo(.EV1LPR), %o0" + "\n";
      // replace %o5 with variable
      prepCall = "\t" + "mov" + "\t" + getDestinationRegister() + ", %o1" + "\n";
      callScan = "\t" + "call" + "\t" + "printf, 0" + "\n\t" + "nop";

      return setUpper + setLower + prepCall + callScan;
    } else if (op == Operator.PRINTLN) {
      String setUpper, setLower, prepCall, callScan;

      // get registers from allocator
      setUpper = "sethi" + "\t" + "%hi(.EV1LPRL), %g1" + "\n";
      setLower = "\t" + "or" + "\t" + "%g1, %lo(.EV1LPRL), %o0" + "\n";
      prepCall = "\t" + "mov" + "\t" + getDestinationRegister() + ", %o1" + "\n";
      callScan = "\t" + "call" + "\t" + "printf, 0" + "\n\t" + "nop";

      return setUpper + setLower + prepCall + callScan;
    } else if (op == Operator.READ) {
      String prepRegister;
      String setUpper, setLower, prepCall, callScan;

      prepRegister = "add" + "\t" + "%sp, %g0, " + getDestinationRegister() + "\n\t" + "nop" + "\n";
      // get registers from allocator
      setUpper = "\t" + "sethi" + "\t" + "%hi(.EV1LRD), %g1" + "\n";
      setLower = "\t" + "or" + "\t" + "%g1, %lo(.EV1LRD), %o0" + "\n";
      prepCall = "\t" + "mov" + "\t" + getDestinationRegister() + ", %o1" + "\n";
      callScan = "\t" + "call" + "\t" + "scanf, 0" + "\n\t" + "nop";

      return prepRegister + setUpper + setLower + prepCall + callScan;
    } else if (op == Operator.JUMPI) {
      return getSparc(op)
          + "\t"
          + fields.toString().replace("[", " ").replace("]", "\t")
          + " "
          + comment
          + "\n\t"
          + "nop";
    }
    return getSparc(op)
        + "\t"
        + fields.toString().replace("[", " ").replace("]", "\t")
        + " "
        + comment;
  }
Example #25
0
File: ak.java Project: ZoneMo/test
 public final void notifyChanged()
 {
   String str1;
   if ((this.dxK != null) || (this.fnZ != null))
   {
     if ((!cj.hX(this.username)) && (com.tencent.mm.pluginsdk.h.apl() != null))
       this.eMK = com.tencent.mm.pluginsdk.h.apl().pa(this.username);
     if (!this.foi)
       break label1201;
     if (this.dxK != null)
     {
       Object[] arrayOfObject1 = new Object[1];
       arrayOfObject1[0] = Integer.valueOf(this.dxK.size());
       aa.e("MicroMsg.RoomInfoAdapter", "initData memberList.size %d", arrayOfObject1);
       this.foc.clear();
       this.fob.clear();
       if (this.dxK.size() > 0)
       {
         Iterator localIterator1 = this.dxK.iterator();
         while (localIterator1.hasNext())
         {
           String str4 = (String)localIterator1.next();
           com.tencent.mm.storage.i locali4 = be.uz().su().tO(str4);
           if ((locali4 != null) && (!cj.hX(locali4.getUsername())) && (locali4.getUsername().equals(str4)))
           {
             this.fob.add(locali4);
             this.foc.add(str4);
           }
         }
         if (this.foc.size() < this.dxK.size())
         {
           Iterator localIterator3 = this.dxK.iterator();
           while (localIterator3.hasNext())
           {
             String str3 = (String)localIterator3.next();
             if (!this.foc.contains(str3))
             {
               this.fob.add(new com.tencent.mm.storage.i(str3));
               this.foc.add(str3);
             }
           }
         }
         if (this.fos)
         {
           str1 = cj.R((String)be.uz().sr().get(2), "");
           if (!this.dxK.contains(str1))
             break label1319;
           this.foc.remove(str1);
           Iterator localIterator2 = this.fob.iterator();
           while (localIterator2.hasNext())
           {
             com.tencent.mm.storage.i locali3 = (com.tencent.mm.storage.i)localIterator2.next();
             if (str1.equals(locali3.getUsername()))
               this.fob.remove(locali3);
           }
         }
       }
     }
   }
   label896: label1319: for (int i = 0; ; i = 1)
   {
     if ((i != 0) && (this.dxK.size() == 7))
     {
       this.dxK.add(str1);
       this.foc.remove(this.dxK.remove(-1 + this.dxK.size()));
       this.dxK.remove(-1 + this.dxK.size());
       this.fob.remove(-1 + this.fob.size());
     }
     com.tencent.mm.storage.i locali1 = be.uz().su().tO(str1);
     LinkedList localLinkedList1;
     int k;
     label639: com.tencent.mm.storage.i locali2;
     if ((locali1 != null) && (!cj.hX(locali1.getUsername())) && (locali1.getUsername().equals(str1)))
     {
       this.fob.add(1, locali1);
       this.foc.add(str1);
       if ((!this.fot) || (this.fob.size() < 3))
         break label1133;
       int j = this.fob.size();
       localLinkedList1 = new LinkedList();
       k = 0;
       if (k >= j)
         break label896;
       locali2 = (com.tencent.mm.storage.i)this.fob.get(k);
       if (locali2.rl() <= 0)
         break label721;
       localLinkedList1.add(locali2.rl());
     }
     while (true)
     {
       k++;
       break label639;
       this.fob.add(1, new com.tencent.mm.storage.i(str1));
       break;
       label721: if (!cj.hX(locali2.field_conRemark))
         localLinkedList1.add(locali2.field_conRemark);
       else if (!cj.hX(locali2.field_conRemarkPYShort))
         localLinkedList1.add(locali2.field_conRemarkPYShort);
       else if (!cj.hX(locali2.field_conRemarkPYFull))
         localLinkedList1.add(locali2.field_conRemarkPYFull);
       else if (!cj.hX(locali2.field_pyInitial))
         localLinkedList1.add(locali2.field_pyInitial);
       else if (!cj.hX(locali2.field_quanPin))
         localLinkedList1.add(locali2.field_quanPin);
       else if (!cj.hX(locali2.field_nickname))
         localLinkedList1.add(locali2.field_nickname);
       else if (!cj.hX(locali2.field_username))
         localLinkedList1.add(locali2.field_username);
     }
     Object[] arrayOfObject2 = new Object[1];
     arrayOfObject2[0] = localLinkedList1.toString();
     aa.f("MicroMsg.RoomInfoAdapter", "klem, order list:%s", arrayOfObject2);
     ArrayList localArrayList = new ArrayList();
     localArrayList.add(this.fob.get(0));
     localArrayList.add(this.fob.get(1));
     LinkedList localLinkedList2 = new LinkedList();
     localLinkedList2.add(localLinkedList1.get(0));
     localLinkedList2.add(localLinkedList1.get(0));
     int m = this.fob.size();
     for (int n = 2; n < m; n++)
     {
       String str2 = (String)localLinkedList1.get(n);
       int i1 = localArrayList.size();
       for (int i2 = 1; (i2 < i1) && (str2.compareToIgnoreCase((String)localLinkedList2.get(i2)) >= 0); i2++);
       localLinkedList2.add(i2, str2);
       localArrayList.add(i2, this.fob.get(n));
     }
     this.fob.clear();
     this.fob = localArrayList;
     label1133: this.foe = this.fob.size();
     if (this.foe == 0)
       this.fod = 4;
     while (true)
     {
       aa.d("MicroMsg.RoomInfoAdapter", "Number Size  contactSize :" + this.foe + " realySize : " + this.fod);
       super.notifyDataSetChanged();
       return;
       label1201: arZ();
       break;
       if ((this.foh) && (this.fog))
         this.fod = (4 * (1 + (1 + this.foe) / 4));
       else if (((this.foh) && (!this.fog)) || ((!this.foh) && (this.fog)))
         this.fod = (4 * (1 + this.foe / 4));
       else if ((!this.foh) && (!this.fog))
         this.fod = (4 * (1 + (-1 + this.foe) / 4));
     }
   }
 }
 @Override
 public final String toString() {
   return expressions.toString();
 }
Example #27
0
 public String toString() {
   return eventStack.toString() + "/" + next + " -> " + stateStack.toString() + "/" + state;
 }
Example #28
0
  /**
   * Look at the various property settings and create the command line for this server.
   *
   * @return the command line for this server.
   */
  protected List buildExecCommand() {

    try {
      String cmd = getCommand();
      if (cmd == null) {
        return null;
      }
      mLogger.finest(LogUtil.splitLine(cmd));
      // Get java specific properties
      LinkedList execTokens = tokenizeCommand(cmd);

      String firstToken = (String) execTokens.get(0);

      if (firstToken.equals("java")) { // This is a java command, so rework it

        if (execTokens.size() < 2) {
          return null;
        }

        mIsJavaServer = true;

        List props = new LinkedList();
        props.add(mPropertyPrefix + ".nativeLogging");
        props.add(WDConstants.WD_PREFIX + ".nativeLogging");
        String nativeLog = getProperty(props);
        if (nativeLog == null || nativeLog.equals("false")) {
          setNativeLoggingUsed(false);
        } else {
          setNativeLoggingUsed(true);
        }

        String mainClassName = (String) execTokens.getLast();

        List cmdLineFlags = null;
        if (execTokens.size() > 2) {
          cmdLineFlags = execTokens.subList(1, execTokens.size() - 1);
        }

        String javaClasspath = getJavaClasspath();
        String addCp = getJavaAdditionalClasspath();
        if (addCp != null) {
          javaClasspath += File.pathSeparator + addCp;
        }
        String jvm = getJavaJVM();
        String jvmType = getJVMType();
        List jvmFlags = getJVMFlags();
        List appArgs = getAppArgs();

        mServerCmd =
            new ServerCommand(
                jvm, jvmType, jvmFlags, javaClasspath, mainClassName, cmdLineFlags, appArgs);

        updateFlags(mServerCmd);
        updateServerCommandForSpecialHandling(mServerCmd);

        execTokens = mServerCmd.getTokens();
        mLogger.finest(LogUtil.splitLine(execTokens.toString()));
      } else {
        setNativeLoggingUsed(true);
      }
      return execTokens;
    } catch (Exception e) {
      mLogger.severe("Failed to buildExecCmd", e);
      return null;
    }
  }
Example #29
0
 public String toString() {
   return list.toString();
 }
Example #30
0
 public String toString() {
   return deque.toString();
 }