Package java.lang

Examples of java.lang.StringBuffer


     * Serialises the child sequence and returns it as a string.
     *
     * @return a String of the serialised child sequence.
     */
    private String serialiseChildSequence() {
        StringBuffer buffer = new StringBuffer();
        for(Iterator it = childSequence.iterator(); it.hasNext();) {
            Integer child = (Integer)it.next();
            buffer.append("/" + child.toString());
        }
        return buffer.toString();
    }
View Full Code Here


  private StringBuffer value;
  public int line;
  public char ttype;
 
  public QASHToken() {
    this.value = new StringBuffer();
    this.ttype=0;
  }
View Full Code Here

  public QASHToken(double token, char ttype, int line) {
    this(Integer.toString((int)token),ttype,line);
  }
 
  public QASHToken(char token, char ttype, int line) {
    this(new StringBuffer().append(token),(char)ttype,line);
  }
View Full Code Here

  public QASHToken(String token, int ttype, int line) {
    this(token,(char)ttype,line);
  }
 
  public QASHToken(String token, char ttype, int line) {
    this(new StringBuffer().append(token),ttype,line);
  }
View Full Code Here

    if (value.length()==0)
      return token;
    // try numerical append, if it fails, try string append
    if ((ttype==TT_NUMBER)&(token.ttype==TT_NUMBER)) {
      try {
        value = new StringBuffer(Integer.toString((this.intValue()+token.intValue())));
      }
      catch (NumberFormatException e) {
        value.append(token.value.toString());
      }
    }
View Full Code Here

         * Return a string representation of the given map, but only for
         * those entries where the value has a size greater than 1
         * @param map a map of key to Set of value
         */
    private final String printDuplicatesFromMap(final Map map){
        final StringBuffer sb = new StringBuffer();
        final Iterator it = map.entrySet().iterator();
        Map.Entry entry = getNextDuplicate(it);
        if (entry != null){
            printEntry(sb, entry);
            while ((entry = getNextDuplicate(it)) != null){
                sb.append(", ");
                printEntry(sb, entry);
            }
        }
        return sb.toString();
    }
View Full Code Here

         * Return a string representation of the given map, but only for
         * those entries where the value has a size greater than 1
         * @param map a map of key to Set of value
         */
    private final String printDuplicatesFromMap(final Map map){
        final StringBuffer sb = new StringBuffer();
        final Iterator it = map.entrySet().iterator();
        Map.Entry entry = getNextDuplicate(it);
        if (entry != null){
            printEntry(sb, entry);
            while ((entry = getNextDuplicate(it)) != null){
                sb.append(", ");
                printEntry(sb, entry);
            }
        }
        return sb.toString();
    }
View Full Code Here

   
    /** Prepare a printable version of this instance.
     * @return the String representation of this object
     */   
    public String toString() {
        StringBuffer buf = new StringBuffer ("LoggerJDK14: ")//NOI18N
        buf.append (" name: "); buf.append (getName()); //NOI18N
        buf.append (", super: "); buf.append (super.toString())//NOI18N
        buf.append (", logging level: "); buf.append (getLevel()); //NOI18N
        return buf.toString();
    }
View Full Code Here

    private static final String width   = new String("-width");
    private static final String color   = new String("-color");
    private static final String style   = new String("-style");

    private String formatPadding(String[] saSide) {
        StringBuffer sb = new StringBuffer(14);
        return sb.append(padding).append(saSide[0]).toString();
    }
View Full Code Here

        StringBuffer sb = new StringBuffer(14);
        return sb.append(padding).append(saSide[0]).toString();
    }

    private String formatColor(String[] saSide) {
        StringBuffer sb = new StringBuffer(19);
        return sb.append(border).append(saSide[0]).append(color).toString();
    }
View Full Code Here

TOP

Related Classes of java.lang.StringBuffer

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.