/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given prefix before every {@code n} code points. * * @param b the string builder * @param prefix the prefix * @param n the number of code points between each prefix * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final String prefix, final int n) { return drainTo(b, prefix, -1, n); }
/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given delimiter after every {@code n} code points. * * @param b the string builder * @param delim the delimiter * @param n the number of code points between each delimiter * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final int delim, final int n) { return drainTo(b, null, delim, n); }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix and delimiter before and after every {@code n} * code points, respectively. * * @param prefix the prefix * @param delim the delimiter * @param n the number of code points between each prefix and delimiter * @return the string */ public String drainToString(final String prefix, final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, delim, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given delimiter after every {@code n} code points. * * @param delim the delimiter * @param n the number of code points between each delimiter * @return the string */ public String drainToString(final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), null, delim, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix before every {@code n} code points. * * @param prefix the prefix * @param n the number of code points between each prefix * @return the string */ public String drainToString(final String prefix, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, -1, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string. * * @return the string */ public String drainToString() { return hasNext() ? drainTo(new StringBuilder()).toString() : ""; }
/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given prefix before every {@code n} code points. * * @param b the string builder * @param prefix the prefix * @param n the number of code points between each prefix * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final String prefix, final int n) { return drainTo(b, prefix, -1, n); }
/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given prefix before every {@code n} code points. * * @param b the string builder * @param prefix the prefix * @param n the number of code points between each prefix * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final String prefix, final int n) { return drainTo(b, prefix, -1, n); }
/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given delimiter after every {@code n} code points. * * @param b the string builder * @param delim the delimiter * @param n the number of code points between each delimiter * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final int delim, final int n) { return drainTo(b, null, delim, n); }
/** * Drain all the remaining code points in this iterator to the given string builder, * inserting the given delimiter after every {@code n} code points. * * @param b the string builder * @param delim the delimiter * @param n the number of code points between each delimiter * @return the same string builder */ public StringBuilder drainTo(StringBuilder b, final int delim, final int n) { return drainTo(b, null, delim, n); }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given delimiter after every {@code n} code points. * * @param delim the delimiter * @param n the number of code points between each delimiter * @return the string */ public String drainToString(final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), null, delim, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix before every {@code n} code points. * * @param prefix the prefix * @param n the number of code points between each prefix * @return the string */ public String drainToString(final String prefix, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, -1, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given delimiter after every {@code n} code points. * * @param delim the delimiter * @param n the number of code points between each delimiter * @return the string */ public String drainToString(final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), null, delim, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix before every {@code n} code points. * * @param prefix the prefix * @param n the number of code points between each prefix * @return the string */ public String drainToString(final String prefix, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, -1, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix and delimiter before and after every {@code n} * code points, respectively. * * @param prefix the prefix * @param delim the delimiter * @param n the number of code points between each prefix and delimiter * @return the string */ public String drainToString(final String prefix, final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, delim, n).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string. * * @return the string */ public String drainToString() { return hasNext() ? drainTo(new StringBuilder()).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string. * * @return the string */ public String drainToString() { return hasNext() ? drainTo(new StringBuilder()).toString() : ""; }
/** * Drain all the remaining code points in this iterator to a new string, * inserting the given prefix and delimiter before and after every {@code n} * code points, respectively. * * @param prefix the prefix * @param delim the delimiter * @param n the number of code points between each prefix and delimiter * @return the string */ public String drainToString(final String prefix, final int delim, final int n) { return hasNext() ? drainTo(new StringBuilder(), prefix, delim, n).toString() : ""; }