コード例 #1
0
ファイル: Atm.java プロジェクト: TracyMRohlin/Java-GUI
  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;
  }
コード例 #2
0
ファイル: Atm.java プロジェクト: TracyMRohlin/Java-GUI
  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);
  }
コード例 #3
0
ファイル: DescriptorProto.java プロジェクト: amikey/wire
 @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();
 }
コード例 #4
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(")");
  }
コード例 #5
0
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[DescribeKnowledgeSettings_element ");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #6
0
ファイル: uml2uni.java プロジェクト: padenr/uidaho
  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);
    }
  }
コード例 #7
0
ファイル: RedactedExtension.java プロジェクト: crazybob/wire
 @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();
 }
コード例 #8
0
ファイル: ExpANDPr.java プロジェクト: pimenta53/QualityCert
  /**
   * 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(")");
  }
コード例 #9
0
 @Override
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[GetUserInfo_element ");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #10
0
  public String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder();
    sb.append("[DescribeTabs_element ");

    sb.append("]\n");
    return sb.toString();
  }
コード例 #11
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[InvalidIdFault ");
   sb.append(super.toString());
   sb.append("]\n");
   return sb.toString();
 }
コード例 #12
0
 @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();
 }
コード例 #13
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();
 }
コード例 #14
0
 @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();
 }
コード例 #15
0
ファイル: MethodOptions.java プロジェクト: bttelle/wire
 @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();
 }
コード例 #16
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[SendEmail_element ");
   sb.append(" messages=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(messages) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #17
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[Update_element ");
   sb.append(" sObjects=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(sObjects) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #18
0
ファイル: RedactedChild.java プロジェクト: 44kksharma/wire
 @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();
 }
コード例 #19
0
 @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();
 }
コード例 #20
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[DescribeSoftphoneLayoutInfoField ");
   sb.append(" name=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(name) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #21
0
ファイル: Throwable.java プロジェクト: soc/avian
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(getClass().getName());
   if (message != null) {
     sb.append(": ").append(message);
   }
   return sb.toString();
 }
コード例 #22
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[CheckRetrieveStatusResponse_element ");
   sb.append(" result=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(result) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #23
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[Process_element ");
   sb.append(" actions=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(actions) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #24
0
ファイル: MailboxProperties.java プロジェクト: kevinkrouse/j
 private static String propertyToXml(String name, String value) {
   StringBuilder sb = new StringBuilder("    <property name=\"");
   sb.append(name);
   sb.append("\" value=\"");
   sb.append(value);
   sb.append("\"/>");
   sb.append(lineSeparator);
   return new String(sb.toString());
 }
コード例 #25
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[ProcessSubmitRequest ");
   sb.append(super.toString());
   sb.append(" objectId=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(objectId) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #26
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[QueryOptions_element ");
   sb.append(super.toString());
   sb.append(" batchSize=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(batchSize) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #27
0
 public String toString() {
   java.lang.StringBuilder sb = new java.lang.StringBuilder();
   sb.append("[DebuggingHeader_element ");
   sb.append(super.toString());
   sb.append(" debugLevel=");
   sb.append("'" + com.sforce.ws.util.Verbose.toString(debugLevel) + "'\n");
   sb.append("]\n");
   return sb.toString();
 }
コード例 #28
0
ファイル: CONFIG.java プロジェクト: lianry/MyProject
 public static void introduce() {
   java.lang.StringBuilder builder = new java.lang.StringBuilder();
   builder.append("This is a simple example to show how to write a \n");
   builder.append("request and reply pattern program with Apache ActiveMQ.\n");
   builder.append("which is not support such pattern.\n\n");
   builder.append("                       -------- By Mike Tang\n");
   builder.append("                   2014-4-17 at Soochow University\n");
   System.out.println(builder.toString());
 }
コード例 #29
0
 @Override
 public java.lang.String toString() {
   java.lang.StringBuilder lclSB = new java.lang.StringBuilder(64);
   lclSB.append("TeamQuestionOpal[");
   lclSB.append("myQuestionId=");
   lclSB.append(toStringField(0));
   lclSB.append(']');
   return lclSB.toString();
 }
コード例 #30
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();
  }