public override string toString() { StringBuffer stringBuffer = new StringBuffer("AxisEntity: "); stringBuffer.append("tooltip = "); stringBuffer.append(this.getToolTipText()); return stringBuffer.toString(); }
public static string getImageMap(string name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(new StringBuffer().append("<map id=\"").append(ImageMapUtilities.htmlEscape(name)).append("\" name=\"").append(ImageMapUtilities.htmlEscape(name)).append("\">").toString()); stringBuffer.append(StringUtils.getLineSeparator()); EntityCollection entityCollection = info.getEntityCollection(); if (entityCollection != null) { int i = entityCollection.getEntityCount() - 1; while (i >= 0) { ChartEntity entity = entityCollection.getEntity(i); if (entity.getToolTipText() != null || entity.getURLText() != null) { string imageMapAreaTag = entity.getImageMapAreaTag(toolTipTagFragmentGenerator, urlTagFragmentGenerator); if (String.instancehelper_length(imageMapAreaTag) > 0) { stringBuffer.append(imageMapAreaTag); stringBuffer.append(StringUtils.getLineSeparator()); } } i += -1; } } stringBuffer.append("</map>"); return stringBuffer.toString(); }
public override string toString() { StringBuffer stringBuffer = new StringBuffer("CategoryLabelEntity: "); stringBuffer.append("category="); stringBuffer.append((object) this.key); stringBuffer.append(new StringBuffer().append(", tooltip=").append(this.getToolTipText()).toString()); stringBuffer.append(new StringBuffer().append(", url=").append(this.getURLText()).toString()); return stringBuffer.toString(); }
public virtual StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) { string str = String.instancehelper_toUpperCase(Long.toHexString(number)); int num1 = this.m_numDigits - String.instancehelper_length(str); int num2 = 0 >= num1 ? 0 : num1; StringBuffer stringBuffer = new StringBuffer("0x"); for (int index = 0; index < num2; ++index) stringBuffer.append(0); stringBuffer.append(str); return stringBuffer; }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(this.text); if (stringBuffer.length() < this.length) { char[] chArray = new char[this.length - stringBuffer.length()]; Arrays.fill(chArray, ' '); stringBuffer.append(chArray); } return stringBuffer.toString(); }
public static string join(string delimiter, Collection values) { StringBuffer stringBuffer = new StringBuffer(); Iterator iterator = values.iterator(); while (iterator.hasNext()) { object obj = iterator.next(); stringBuffer.append(ParameterizedAssertionError.stringValueOf(obj)); if (iterator.hasNext()) stringBuffer.append(delimiter); } return stringBuffer.toString(); }
public static string javascriptEscape(string input) { if (input == null) { string str = "Null 'input' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else { StringBuffer stringBuffer = new StringBuffer(); int num1 = String.instancehelper_length(input); for (int index = 0; index < num1; ++index) { int num2 = (int) String.instancehelper_charAt(input, index); switch (num2) { case 34: stringBuffer.append("\\\""); break; case 39: stringBuffer.append("\\'"); break; case 92: stringBuffer.append("\\\\"); break; default: stringBuffer.append((char) num2); break; } } return stringBuffer.toString(); } }
public virtual void insertString(int offs, string str, AttributeSet a) { if (str == null) return; if (this.maxlen < 0) base.insertString(offs, str, a); char[] chArray = String.instancehelper_toCharArray(str); StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(chArray, 0, Math.min(this.maxlen, chArray.Length)); base.insertString(offs, stringBuffer.toString(), a); }
protected override string instanceToLibsvm(weka.core.Instance inst) { //StringBuffer.__<clinit>(); //StringBuffer buffer = new StringBuffer(new StringBuilder().append("").append(inst.classValue()).toString()); StringBuffer buffer = new StringBuffer(new StringBuilder().append("").append(inst.classValue() - 1).toString()); for (int i = 0; i < inst.numAttributes(); i++) { if ((i != inst.classIndex()) && (inst.value(i) != 0f)) { buffer.append(new StringBuilder().append(" ").append((int)(i + 1)).append(":").append(inst.value(i)).toString()); } } return buffer.toString(); }
public static void writeAttributedString(AttributedString @as, ObjectOutputStream stream) { if (stream == null) { string str = "Null 'stream' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else if (@as != null) { stream.writeBoolean(false); AttributedCharacterIterator iterator = @as.getIterator(); StringBuffer stringBuffer = new StringBuffer(); for (int index = (int) ((CharacterIterator) iterator).first(); index != (int) ushort.MaxValue; index = (int) ((CharacterIterator) iterator).next()) stringBuffer = stringBuffer.append((char) index); stream.writeObject((object) stringBuffer.toString()); int num = (int) ((CharacterIterator) iterator).first(); int beginIndex = ((CharacterIterator) iterator).getBeginIndex(); for (; num != (int) ushort.MaxValue; { int runLimit; num = (int) ((CharacterIterator) iterator).setIndex(runLimit); } ) { stream.writeChar(num); runLimit = iterator.getRunLimit(); stream.writeInt(runLimit - beginIndex); HashMap hashMap = new HashMap(iterator.getAttributes()); stream.writeObject((object) hashMap); } stream.writeChar((int) ushort.MaxValue); } else stream.writeBoolean(true); }
public virtual StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { long num1 = date.getTime() - this.baseMillis; string str; if (num1 < 0L) { num1 *= -1L; str = "-"; } else str = this.positivePrefix; long num2 = num1; long num3 = RelativeDateFormat.MILLISECONDS_IN_ONE_DAY; long num4 = -1L; long num5 = num3 != num4 ? num2 / num3 : -num2; long num6 = num1 - num5 * RelativeDateFormat.MILLISECONDS_IN_ONE_DAY; long num7 = num6; long num8 = RelativeDateFormat.MILLISECONDS_IN_ONE_HOUR; long num9 = -1L; long num10 = num8 != num9 ? num7 / num8 : -num7; long num11 = num6 - num10 * RelativeDateFormat.MILLISECONDS_IN_ONE_HOUR; long num12 = num11 / 60000L; double num13 = (double) (num11 - num12 * 60000L) / 1000.0; toAppendTo.append(str); if (num5 != 0L || this.showZeroDays) toAppendTo.append(new StringBuffer().append(this.dayFormatter.format(num5)).append(this.getDaySuffix()).toString()); if (num10 != 0L || this.showZeroHours) toAppendTo.append(new StringBuffer().append(this.hourFormatter.format(num10)).append(this.getHourSuffix()).toString()); toAppendTo.append(new StringBuffer().append(this.minuteFormatter.format(num12)).append(this.getMinuteSuffix()).toString()); toAppendTo.append(new StringBuffer().append(this.secondFormatter.format(num13)).append(this.getSecondSuffix()).toString()); return toAppendTo; }
public virtual StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) { return toAppendTo.append(this.getDirectionCode((double) number)); }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(Object.instancehelper_getClass((object) this).getName()); stringBuffer.append("={ModuleClass="); stringBuffer.append(this.getModuleClass()); if (this.getMajorVersion() != null) { stringBuffer.append("; Version="); stringBuffer.append(this.getMajorVersion()); if (this.getMinorVersion() != null) { stringBuffer.append("-"); stringBuffer.append(this.getMinorVersion()); if (this.getPatchLevel() != null) { stringBuffer.append("_"); stringBuffer.append(this.getPatchLevel()); } } } stringBuffer.append("}"); return stringBuffer.toString(); }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(this.message); if (this.param != null) { for (int index = 0; index < this.param.Length; ++index) stringBuffer.append(this.param[index]); } return stringBuffer.toString(); }
public StringBuffer appendTail(StringBuffer sb) { sb.append(text, lastAppendPosition, getTextLength()); return sb; }
public static string ReplaceString(string whom, string what, string with) { int j = -1; int i = whom.IndexOf(what); if (i == -1) return whom; StringBuffer b = new StringBuffer(); b.ensureCapacity(whom.Length); while (i > -1) { b.append( whom.Substring(j + what.Length, i - j - what.Length) + with ); j = i; i = whom.IndexOf(what, i + what.Length); } b.append( whom.Substring(j + what.Length) ); return b.ToString(); }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); for (int index = 0; index < this.labels.size(); ++index) stringBuffer.append(this.getPieLabelRecord(index).toString()).append("\n"); return stringBuffer.toString(); }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(new StringBuilder().append(this.getTestHeader()).append(": ").append(Throwable.instancehelper_getMessage(this.fThrownException)).toString()); return stringBuffer.toString(); }
public string StringFromBytes(byte[] byteArray) { //char[] characters = (new UnicodeEncoding()).GetChars(byteArray); /* java.io.StringWriter writer = new java.io.StringWriter(); writer.write(characters); StringBuffer javabuffer = new StringBuffer(); javabuffer.append(characters); return javabuffer.toString(); */ ByteBuffer bb = ByteBuffer.wrap(byteArray); //CharBuffer cb = bb.asCharBuffer(); StringBuffer javabuffer = new StringBuffer(); char[] ca = Charset.defaultCharset().decode(bb).array(); javabuffer.append(ca); string str0 = javabuffer.toString(); return str0; /* javabuffer = new StringBuffer(); CharBuffer cb = bb.asCharBuffer(); ca = cb.array(); javabuffer.append(ca); string str1 = javabuffer.toString(); return str1; */ }
public virtual StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) { StringBuffer stringBuffer = new StringBuffer(); if (this.showBase) { stringBuffer.append(this.baseLabel); stringBuffer.append("^"); } stringBuffer.append(this.formatter.format(this.calculateLog((double) number))); return stringBuffer; }
public virtual StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { ((Calendar) this.calendar).setTime(date); int index = ((Calendar) this.calendar).get(2); toAppendTo.append(this.months[index]); if (this.showYear[index]) toAppendTo.append(this.yearFormatter.format(date)); return toAppendTo; }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(this.getName()); stringBuffer.append(" version "); stringBuffer.append(this.getVersion()); stringBuffer.append(".\n"); stringBuffer.append(this.getCopyright()); stringBuffer.append(".\n"); stringBuffer.append("\n"); stringBuffer.append("For terms of use, see the licence below.\n"); stringBuffer.append("\n"); stringBuffer.append("FURTHER INFORMATION:"); stringBuffer.append(this.getInfo()); stringBuffer.append("\n"); stringBuffer.append("CONTRIBUTORS:"); if (this.contributors != null) { Iterator iterator = this.contributors.iterator(); while (iterator.hasNext()) { Contributor contributor = (Contributor) iterator.next(); stringBuffer.append(contributor.getName()); stringBuffer.append(" ("); stringBuffer.append(contributor.getEmail()); stringBuffer.append(")."); } } else stringBuffer.append("None"); stringBuffer.append("\n"); stringBuffer.append("OTHER LIBRARIES USED BY "); stringBuffer.append(this.getName()); stringBuffer.append(":"); Library[] libraries = this.getLibraries(); if (libraries.Length != 0) { for (int index = 0; index < libraries.Length; ++index) { Library library = libraries[index]; stringBuffer.append(library.getName()); stringBuffer.append(" "); stringBuffer.append(library.getVersion()); stringBuffer.append(" ("); stringBuffer.append(library.getInfo()); stringBuffer.append(")."); } } else stringBuffer.append("None"); stringBuffer.append("\n"); stringBuffer.append(this.getName()); stringBuffer.append(" LICENCE TERMS:"); stringBuffer.append("\n"); stringBuffer.append(this.getLicenceText()); return stringBuffer.toString(); }
public virtual string toString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("SortModule: "); stringBuffer.append(this.position); stringBuffer.append(" "); stringBuffer.append(this.state.getModule().getName()); stringBuffer.append(" "); stringBuffer.append(this.state.getModule().getModuleClass()); return stringBuffer.toString(); }
private string formatName([In] List obj0, [In] string obj1) { StringBuffer stringBuffer = new StringBuffer(); Iterator iterator = obj0.iterator(); while (iterator.hasNext()) { stringBuffer.append(iterator.next()); if (iterator.hasNext()) stringBuffer.append("/"); } if (obj1 != null) { stringBuffer.append('?'); stringBuffer.append(obj1); } return stringBuffer.toString(); }
public Matcher appendReplacement(StringBuffer sb, String replacement) { // If no match, return error if (first < 0) throw new InvalidOperationException("No match available"); // Process substitution string to replace group references with groups int cursor = 0; StringBuilder result = new StringBuilder(); while (cursor < replacement.length()) { char nextChar = replacement.charAt(cursor); if (nextChar == '\\') { cursor++; nextChar = replacement.charAt(cursor); result.append(nextChar); cursor++; } else if (nextChar == '$') { // Skip past $ cursor++; // A StringIndexOutOfBoundsException is thrown if // this "$" is the last character in replacement // string in current implementation, a IAE might be // more appropriate. nextChar = replacement.charAt(cursor); int refNum = -1; if (nextChar == '{') { cursor++; StringBuilder gsb = new StringBuilder(); while (cursor < replacement.length()) { nextChar = replacement.charAt(cursor); if (ASCII.isLower(nextChar) || ASCII.isUpper(nextChar) || ASCII.isDigit(nextChar)) { gsb.append(nextChar); cursor++; } else { break; } } if (gsb.length() == 0) throw new IllegalArgumentException( "named capturing group has 0 length name"); if (nextChar != '}') throw new IllegalArgumentException( "named capturing group is missing trailing '}'"); String gname = gsb.toString(); if (ASCII.isDigit(gname.charAt(0))) throw new IllegalArgumentException( "capturing group name {" + gname + "} starts with digit character"); if (!parentPattern.namedGroups().containsKey(gname)) throw new IllegalArgumentException( "No group with name {" + gname + "}"); refNum = parentPattern.namedGroups().get(gname); cursor++; } else { // The first number is always a group refNum = (int)nextChar - '0'; if ((refNum < 0)||(refNum > 9)) throw new IllegalArgumentException( "Illegal group reference"); cursor++; // Capture the largest legal group string boolean done = false; while (!done) { if (cursor >= replacement.length()) { break; } int nextDigit = replacement.charAt(cursor) - '0'; if ((nextDigit < 0)||(nextDigit > 9)) { // not a number break; } int newRefNum = (refNum * 10) + nextDigit; if (groupCount() < newRefNum) { done = true; } else { refNum = newRefNum; cursor++; } } } // Append group if (start(refNum) != -1 && end(refNum) != -1) result.append(text, start(refNum), end(refNum)); } else { result.append(nextChar); cursor++; } } // Append the intervening text sb.append(text, lastAppendPosition, first); // Append the match substitution sb.append(result); lastAppendPosition = last; return this; }
public static string colorToString(Color c) { try { foreach (Field field in (PaintUtilities.class\u0024java\u0024awt\u0024Color != null ? PaintUtilities.class\u0024java\u0024awt\u0024Color : (PaintUtilities.class\u0024java\u0024awt\u0024Color = PaintUtilities.class\u0024("java.awt.Color"))).getFields(PaintUtilities.__\u003CGetCallerID\u003E())) { if (Modifier.isPublic(field.getModifiers()) && Modifier.isFinal(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) { string name = field.getName(); object obj = field.get((object) null, PaintUtilities.__\u003CGetCallerID\u003E()); if (obj is Color && c.equals(obj)) return name; } } goto label_9; } catch (Exception ex) { int num = 2; if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num) == null) throw; } label_9: string str = Integer.toHexString(c.getRGB() & 16777215); StringBuffer stringBuffer = new StringBuffer(7); stringBuffer.append("#"); int num1 = 6 - String.instancehelper_length(str); for (int index = 0; index < num1; ++index) stringBuffer.append("0"); stringBuffer.append(str); return stringBuffer.toString(); }