Esempio n. 1
0
  /**
   * Appends a string representation of this term to the buffer given as argument.
   *
   * @param buffer the buffer to which a string represention of this term is appended.
   */
  @Override
  public void toStringBuilder(java.lang.StringBuilder buffer) {
    buffer.append("ExpANDPr(");
    _e1.toStringBuilder(buffer);

    buffer.append(")");
  }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[DescribeKnowledgeSettings_element ");
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 3
0
  public void open_account(boolean save) {
    // actually opens the account
    customer.addAccount(
        starting_account_number,
        save); // addAccount will create a new account based on whether it is savings/checkings

    StringBuilder text = new StringBuilder();
    text.append("<html>Account created!<br>");
    String result = customer.returnInfo();
    String subResult = result.substring(6);
    text.append(subResult);
    String infoText = text.toString();
    jf.displayInfo(infoText);

    transaction_counter++;
    add_interest();
    try {
      saveFile(cust, DBfile);
      saveFile(adminLogs, logFile);
    } catch (IOException e) {
      e.printStackTrace();
    }
    customer = null; // resets the customer and account after each transaction
    pin = null;
  }
Esempio n. 4
0
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   if (start != null) builder.append(", start=").append(start);
   if (end != null) builder.append(", end=").append(end);
   return builder.replace(0, 2, "ExtensionRange{").append('}').toString();
 }
Esempio n. 5
0
  /**
   * Appends a string representation of this term to the buffer given as argument.
   *
   * @param buffer the buffer to which a string represention of this term is appended.
   */
  @Override
  public void toStringBuilder(java.lang.StringBuilder buffer) {
    buffer.append("RelExpMoreEqual(");
    _a5.toStringBuilder(buffer);

    buffer.append(")");
  }
Esempio n. 6
0
 static {
   java.lang.String os = java.lang.System.getProperty("os.name");
   local = !"Linux".equals(os);
   java.lang.StringBuilder builder = new StringBuilder();
   builder.append(local ? "local" : "server").append(".").append("ruan").append(".");
   prefix = builder.toString();
 }
Esempio n. 7
0
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   if (c != null) builder.append(", c=").append(c);
   if (d != null) builder.append(", d=").append(d);
   return builder.replace(0, 2, "A{").append('}').toString();
 }
Esempio n. 8
0
  public String readLine() {
    StringBuilder buf = null;
    while (this.pos < this.dataBytes.length) {
      int b = ((int) this.dataBytes[this.pos]) & 0xFF;

      // Seitenumbruch
      if (b == 0x0C) {
        break;
      }

      // Zeile vorhanden
      this.pos++;
      if (buf == null) {
        buf = new StringBuilder();
      }

      // Zeilenende?
      if ((b == 0x0A) || (b == 0x0D) || (b == 0x1E)) {
        if (b == 0x0D) {
          if (this.pos < this.dataBytes.length) {
            if (this.dataBytes[this.pos] == 0x0A) {
              this.pos++;
            }
          }
        }
        break;
      }

      if ((b != 0) && (b != 3)) {
        buf.append((char) b);
      }
    }
    return buf != null ? buf.toString() : null;
  }
Esempio n. 9
0
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   if (d != null) builder.append(", d=██");
   if (e != null) builder.append(", e=").append(e);
   return builder.replace(0, 2, "RedactedExtension{").append('}').toString();
 }
  public void run() {
    int msgId;
    DispatchHandlerSynchronizer syncHandler = new DispatchHandlerSynchronizer(30);

    if (mArgs.size() != 1) ReportError("error: wrong number of arguments.");
    else {
      String tableName = mArgs.elementAt(0).sval;
      if (tableName == null) {
        ReportError("error: Bad table name");
      } else {
        try {
          StringBuilder schema = new StringBuilder();

          int error = Global.master.GetSchema(tableName, schema);
          if (error != Error.OK)
            log.severe(
                "Error getting schema for table '" + tableName + "' - " + Error.GetText(error));
          else {
            System.out.println();
            System.out.println(schema.toString());
          }
        } catch (Exception e) {
          e.printStackTrace();
          System.exit(1);
        }
      }
    }
  }
  public String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder();
    sb.append("[DescribeTabs_element ");

    sb.append("]\n");
    return sb.toString();
  }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[GetUserInfo_element ");
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 13
0
  public void composition_tokenizer(String comp_line) {
    comp_line = remove_for_agg(comp_line);

    String c_name = get_first(comp_line, "COMPOSITION");
    String comp_name = get_latter(comp_line, "COMPOSITION");

    StringBuilder construct_param = new StringBuilder();

    construct_param.append(comp_name);
    construct_param.append("_");
    construct_param.append(Integer.toString(param_count));

    String param = construct_param.toString();

    param_count++;

    if (output.get(c_name) != null) {
      comp_name = get_latter(comp_line, "COMPOSITION");
      output.get(c_name).add_parameters(param);
      output.get(c_name).add_comp(param);
    } else {
      comp_name = get_first(comp_line, "COMPOSITION");
      output.put(c_name, classes[object_count]);
      output.get(c_name).set_weird_name(c_name);
      current_class = c_name;
      object_count++;
      output.get(c_name).add_parameters(param);
      output.get(c_name).add_comp(param);
    }
  }
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[InvalidIdFault ");
   sb.append(super.toString());
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 15
0
  public void printAllAccounts(String customerID) {
    // Sorts the customer based on ID, then prints the accounts information

    // change the withdrawal funcitons and deposit functions too
    ajf.dispose();
    ajf = new AdminRunningFrame(this);

    Collections.sort(cust, Customer.CompareIDs);
    String searchString = ajf.getCustomerID();

    StringBuilder stringResults = new StringBuilder();
    String header = header();
    stringResults.append(header);
    for (Customer customer : cust) {
      String id = customer.returnID();
      String name = customer.getName().toUpperCase();
      String pin = customer.returnPin();
      if (searchString.equals(id)) {
        ArrayList<Account> accounts = customer.getAccounts();
        if (!accounts.isEmpty()) {
          for (Account account : accounts) {
            if (account.checkActive()) {
              String accountNumber = account.returnNumber();
              double balance = account.returnBalance();
              String balanceAsString = formatter.format(balance);
              String customerInfo = printAdminInfo(name, id, accountNumber, pin, balanceAsString);
              stringResults.append(customerInfo);
            }
          }
        }
      }
    }
    String resultsAsString = stringResults.toString();
    ajf.printInfo(resultsAsString);
  }
 /**
  * Overrides concatenate in SequenceLoader.java, uses StringBuilder to append sequence repeatedly
  * to itself.
  */
 @Override
 public void concatenate(String s, int times) {
   StringBuilder buildTest = new StringBuilder(s);
   for (int i = 0; i < times; i++) {
     System.out.println("Building time " + i + " of " + times);
     buildTest.append(s);
   }
 }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[QueryAllResponse_element ");
   sb.append(" result='").append(com.sforce.ws.util.Verbose.toString(result)).append("'\n");
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 18
0
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[ResetPasswordResult ");
   sb.append(" password='******'\n");
   sb.append("]\n");
   return sb.toString();
 }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[MalformedQueryFault ");
   sb.append(super.toString());
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 20
0
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(getClass().getName());
   if (message != null) {
     sb.append(": ").append(message);
   }
   return sb.toString();
 }
Esempio n. 21
0
  @Override
  public String toString() {
    StringBuilder msg = new StringBuilder();

    msg.append("(Name: " + name() + " Operator Key: " + mKey + ")");

    return msg.toString();
  }
Esempio n. 22
0
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   if (a != null) builder.append(", a=").append(a);
   if (b != null) builder.append(", b=").append(b);
   if (c != null) builder.append(", c=").append(c);
   return builder.replace(0, 2, "RedactedChild{").append('}').toString();
 }
Esempio n. 23
0
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   if (deprecated != null) builder.append(", deprecated=").append(deprecated);
   if (uninterpreted_option != null)
     builder.append(", uninterpreted_option=").append(uninterpreted_option);
   return builder.replace(0, 2, "MethodOptions{").append('}').toString();
 }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[SendEmailMessage_element ");
   sb.append(" ids='").append(com.sforce.ws.util.Verbose.toString(ids)).append("'\n");
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 25
0
 /**
  * Returns a string representation of the contents of the linked list, from the back to the front.
  *
  * @return a string representation of the linked list, from back to front
  */
 public String toStringReverse() {
   String nodes = toString();
   StringBuilder reverseNodes = new StringBuilder();
   // start at the end and go to the beginning. build new string in that order
   for (int i = nodes.length() - 1; i >= 0; --i) {
     reverseNodes.append(nodes.charAt(i));
   }
   return reverseNodes.toString();
 }
Esempio n. 26
0
 public static void moveCar(int oldPos, int newPos, StringBuilder line) {
   if (oldPos < newPos) {
     line.setCharAt(newPos, '\\');
   } else if (oldPos > newPos) {
     line.setCharAt(newPos, '/');
   } else {
     line.setCharAt(newPos, '|');
   }
 }
 public String nextString() {
   int c = read();
   while (isSpaceChar(c)) c = read();
   StringBuilder res = new StringBuilder();
   do {
     res.appendCodePoint(c);
     c = read();
   } while (!isSpaceChar(c));
   return res.toString();
 }
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[DescribeDataCategoryGroups_element ");
   sb.append(" sObjectType='")
       .append(com.sforce.ws.util.Verbose.toString(sObjectType))
       .append("'\n");
   sb.append("]\n");
   return sb.toString();
 }
Esempio n. 29
0
  /** Returns a textual representation of a bean. */
  public String toString() {

    StringBuilder buffer = new StringBuilder();

    buffer.append("id=[").append(id).append("] ");
    buffer.append("name=[").append(name).append("] ");
    buffer.append("memo=[").append(memo).append("] ");

    return buffer.toString();
  }
Esempio n. 30
0
 public static String indent2(String src, int cols) {
   StringBuilder builder = new StringBuilder();
   char[] spaces = new char[cols];
   Arrays.fill(spaces, ' ');
   for (char ch : src.toCharArray()) {
     builder.append(ch);
     if (ch == '\n') builder.append(spaces);
   }
   return builder.toString();
 }