Package java.util

Examples of java.util.Formatter.format()


        out.format("%10d %10d %19d\n", numRows, numColumns, Matrices
                .cardinality(this));

        for (MatrixEntry e : this)
            if (e.get() != 0)
                out.format("%10d %10d % .12e\n", e.row() + 1, e.column() + 1, e
                        .get());

        return out.toString();
    }
View Full Code Here


    @Override
    public String toString() {
        // Output into coordinate format. Indices start from 1 instead of 0
        Formatter out = new Formatter();

        out.format("%10d %19d\n", size, Matrices.cardinality(this));

        for (VectorEntry e : this)
            if (e.get() != 0)
                out.format("%10d % .12e\n", e.index() + 1, e.get());
View Full Code Here

        out.format("%10d %19d\n", size, Matrices.cardinality(this));

        for (VectorEntry e : this)
            if (e.get() != 0)
                out.format("%10d % .12e\n", e.index() + 1, e.get());

        return out.toString();
    }

    /**
 
View Full Code Here

    public String toString() {
      Formatter f = new Formatter();
      f.format("%s [%d] [%d] %s %s: ", getDate(), reqTime, reqSeq, level, where);

      if (isStart)
        f.format(" (%s) %s %n", ip, getPath());
      else if (isDone)
        f.format(" %d %d %d %n", returnCode, sizeBytes, msecs);

      if (extra != null)
        f.format(" %s", extra);
View Full Code Here

      f.format("%s [%d] [%d] %s %s: ", getDate(), reqTime, reqSeq, level, where);

      if (isStart)
        f.format(" (%s) %s %n", ip, getPath());
      else if (isDone)
        f.format(" %d %d %d %n", returnCode, sizeBytes, msecs);

      if (extra != null)
        f.format(" %s", extra);

      return f.toString();
View Full Code Here

        f.format(" (%s) %s %n", ip, getPath());
      else if (isDone)
        f.format(" %d %d %d %n", returnCode, sizeBytes, msecs);

      if (extra != null)
        f.format(" %s", extra);

      return f.toString();
    }

    void addExtra(String s) {
View Full Code Here

  }

  private String showShape( int[] shape) {
    Formatter f = new Formatter();
    for (int s : shape)
      f.format(" %d", s);
    return f.toString();
  }
}
View Full Code Here

         // get the bytez
         byte[] bytez = internalCreateHash(pathName);
         for(byte b : bytez)
         {
            // format the byte
            f.format("%02x", b);
         }
         // toString
         return f.toString();
      }
View Full Code Here

  }

  @Override
  public String toString() {
    Formatter p = new Formatter();
    p.format("CacheDirector path=%s num=%d %n", getPath(), children.length);
    for (CacheFile f : children)
      p.format("  %s%n", f);
    return p.toString();
  }
}
View Full Code Here

  @Override
  public String toString() {
    Formatter p = new Formatter();
    p.format("CacheDirector path=%s num=%d %n", getPath(), children.length);
    for (CacheFile f : children)
      p.format("  %s%n", f);
    return p.toString();
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.