List<CellProtos.Cell> values = proto.getCellList();
/** * Convert a protocol buffer Result to a client Result * * @param proto the protocol buffer Result to convert * @return the converted client Result */ public static Result toResult(final ClientProtos.Result proto) { if (proto.hasExists()) { if (proto.getStale()) { return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE_STALE :EMPTY_RESULT_EXISTS_FALSE_STALE; } return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE : EMPTY_RESULT_EXISTS_FALSE; } List<CellProtos.Cell> values = proto.getCellList(); if (values.isEmpty()){ return proto.getStale() ? EMPTY_RESULT_STALE : EMPTY_RESULT; } List<Cell> cells = new ArrayList<>(values.size()); ExtendedCellBuilder builder = ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY); for (CellProtos.Cell c : values) { cells.add(toCell(builder, c)); } return Result.create(cells, null, proto.getStale(), proto.getPartial()); }
if (getCellCount() > 0) { hash = (37 * hash) + CELL_FIELD_NUMBER; hash = (53 * hash) + getCellList().hashCode();
List<CellProtos.Cell> values = proto.getCellList();
List<CellProtos.Cell> values = proto.getCellList();
result = result && getCellList() .equals(other.getCellList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) {
result = result && getCellList() .equals(other.getCellList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) {
result = result && getCellList() .equals(other.getCellList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) {
if (getCellCount() > 0) { hash = (37 * hash) + CELL_FIELD_NUMBER; hash = (53 * hash) + getCellList().hashCode();
if (getCellCount() > 0) { hash = (37 * hash) + CELL_FIELD_NUMBER; hash = (53 * hash) + getCellList().hashCode();
if (getCellCount() > 0) { hash = (37 * hash) + CELL_FIELD_NUMBER; hash = (53 * hash) + getCellList().hashCode();
/** * Convert a protocol buffer Result to a client Result * * @param proto the protocol buffer Result to convert * @return the converted client Result */ public static Result toResult(final ClientProtos.Result proto) { if (proto.hasExists()) { if (proto.getStale()) { return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE_STALE :EMPTY_RESULT_EXISTS_FALSE_STALE; } return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE : EMPTY_RESULT_EXISTS_FALSE; } List<CellProtos.Cell> values = proto.getCellList(); if (values.isEmpty()){ return proto.getStale() ? EMPTY_RESULT_STALE : EMPTY_RESULT; } List<Cell> cells = new ArrayList<Cell>(values.size()); for (CellProtos.Cell c : values) { cells.add(toCell(c)); } return Result.create(cells, null, proto.getStale(), proto.getPartial()); }
/** * Convert a protocol buffer Result to a client Result * * @param proto the protocol buffer Result to convert * @return the converted client Result */ public static Result toResult(final ClientProtos.Result proto) { if (proto.hasExists()) { if (proto.getStale()) { return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE_STALE :EMPTY_RESULT_EXISTS_FALSE_STALE; } return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE : EMPTY_RESULT_EXISTS_FALSE; } List<CellProtos.Cell> values = proto.getCellList(); if (values.isEmpty()){ return proto.getStale() ? EMPTY_RESULT_STALE : EMPTY_RESULT; } List<Cell> cells = new ArrayList<>(values.size()); ExtendedCellBuilder builder = ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY); for (CellProtos.Cell c : values) { cells.add(toCell(builder, c)); } return Result.create(cells, null, proto.getStale(), proto.getPartial()); }
List<CellProtos.Cell> values = proto.getCellList();
/** * Convert a protocol buffer Result to a client Result * * @param proto the protocol buffer Result to convert * @return the converted client Result */ public static Result toResult(final ClientProtos.Result proto) { if (proto.hasExists()) { if (proto.getStale()) { return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE_STALE :EMPTY_RESULT_EXISTS_FALSE_STALE; } return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE : EMPTY_RESULT_EXISTS_FALSE; } List<CellProtos.Cell> values = proto.getCellList(); if (values.isEmpty()){ return proto.getStale() ? EMPTY_RESULT_STALE : EMPTY_RESULT; } List<Cell> cells = new ArrayList<>(values.size()); ExtendedCellBuilder builder = ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY); for (CellProtos.Cell c : values) { cells.add(toCell(builder, c)); } return Result.create(cells, null, proto.getStale(), proto.getPartial()); }
result = result && getCellList() .equals(other.getCellList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) {