Search in sources :

Example 36 with StringBuilder

use of java.lang.StringBuilder in project wire by square.

the class Person method toString.

@Override
public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append(", name=").append(Internal.sanitize(name));
    builder.append(", id=").append(id);
    if (email != null)
        builder.append(", email=").append(Internal.sanitize(email));
    if (!phone.isEmpty())
        builder.append(", phone=").append(phone);
    if (!aliases.isEmpty())
        builder.append(", aliases=").append(Internal.sanitize(aliases));
    return builder.replace(0, 2, "Person{").append('}').toString();
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Example 37 with StringBuilder

use of java.lang.StringBuilder in project wire by square.

the class RedactedRequired method toString.

@Override
public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append(", a=██");
    return builder.replace(0, 2, "RedactedRequired{").append('}').toString();
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Example 38 with StringBuilder

use of java.lang.StringBuilder in project wire by square.

the class B method toString.

@Override
public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append(", c=").append(c);
    return builder.replace(0, 2, "B{").append('}').toString();
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Example 39 with StringBuilder

use of java.lang.StringBuilder in project wire by square.

the class SimpleMessage method toString.

@Override
public String toString() {
    StringBuilder builder = new StringBuilder();
    if (optional_int32 != null)
        builder.append(", optional_int32=").append(optional_int32);
    if (optional_nested_msg != null)
        builder.append(", optional_nested_msg=").append(optional_nested_msg);
    if (optional_external_msg != null)
        builder.append(", optional_external_msg=").append(optional_external_msg);
    if (default_nested_enum != null)
        builder.append(", default_nested_enum=").append(default_nested_enum);
    builder.append(", required_int32=").append(required_int32);
    if (!repeated_double.isEmpty())
        builder.append(", repeated_double=").append(repeated_double);
    if (default_foreign_enum != null)
        builder.append(", default_foreign_enum=").append(default_foreign_enum);
    if (no_default_foreign_enum != null)
        builder.append(", no_default_foreign_enum=").append(no_default_foreign_enum);
    if (package_ != null)
        builder.append(", package=").append(Internal.sanitize(package_));
    if (result != null)
        builder.append(", result=").append(Internal.sanitize(result));
    if (other != null)
        builder.append(", other=").append(Internal.sanitize(other));
    if (o != null)
        builder.append(", o=").append(Internal.sanitize(o));
    return builder.replace(0, 2, "SimpleMessage{").append('}').toString();
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Example 40 with StringBuilder

use of java.lang.StringBuilder in project wire by square.

the class Person method toString.

@Override
public String toString() {
    StringBuilder builder = new StringBuilder();
    if (name != null)
        builder.append(", name=").append(Internal.sanitize(name));
    builder.append(", id=").append(id);
    if (email != null)
        builder.append(", email=").append(Internal.sanitize(email));
    if (!phones.isEmpty())
        builder.append(", phones=").append(phones);
    if (!aliases.isEmpty())
        builder.append(", aliases=").append(Internal.sanitize(aliases));
    if (foo != null)
        builder.append(", foo=").append(foo);
    if (bar != null)
        builder.append(", bar=").append(Internal.sanitize(bar));
    return builder.replace(0, 2, "Person{").append('}').toString();
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Aggregations

StringBuilder (java.lang.StringBuilder)40 Override (java.lang.Override)9 String (java.lang.String)6 IOException (java.io.IOException)5 BufferedReader (java.io.BufferedReader)4 BufferedWriter (java.io.BufferedWriter)2 File (java.io.File)2 NumberFormatException (java.lang.NumberFormatException)2 Object (java.lang.Object)2 ArrayList (java.util.ArrayList)2 Chromosome (PedigreeSim.Chromosome)1 Individual (PedigreeSim.Individual)1 Locus (PedigreeSim.Locus)1 Rational (android.util.Rational)1 Digest (cz1.gbs.core.Digest)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 FileReader (java.io.FileReader)1 InputStreamReader (java.io.InputStreamReader)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 RuntimeException (java.lang.RuntimeException)1