Exemplo n.º 1
0
  @Override
  public boolean equalsExact(ICodedBatch codedBatchObj) {
    if (_size != codedBatchObj.getSize()) return false;

    BulkMatrix objContent = codedBatchObj.getBulkMatrix();
    if (_bm == null) return objContent == null ? true : false;
    else if (objContent == null) return false;

    return _bm.equals(objContent);
  }
Exemplo n.º 2
0
  public void toString(Writer ioWriter) throws IOException {
    ioWriter.append("{");

    for (int i = 0; i < _size && i < CodedBatch._MAX_WRITE_SIZE; i++)
      ioWriter.append((i == 0 ? "" : ",") + BytesUtil.hex(_bm.getByte(i)));

    int remaining = _size - CodedBatch._MAX_WRITE_SIZE;
    if (remaining > 0) ioWriter.append(",...(" + remaining + ")");

    ioWriter.append("}");
  }
Exemplo n.º 3
0
 public CodedBatch(CodedBatchType codedBatchType, BulkMatrix content) {
   _bm = content;
   _size = _bm.getSize();
   _codedBatchType = codedBatchType;
 }