本文整理了Java中com.addthis.bundle.core.Bundle.getCount()
方法的一些代码示例,展示了Bundle.getCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.getCount()
方法的具体详情如下:
包路径:com.addthis.bundle.core.Bundle
类名称:Bundle
方法名:getCount
暂无
代码示例来源:origin: addthis/hydra
@Override
public int getCount() {
return wrap.getCount();
}
代码示例来源:origin: addthis/hydra
@Override
public int getCount() {
return mergedBundle.getCount();
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
if (col < row.getCount()) {
BundleColumnBinder binder = getSourceColumnBinder(row);
ValueObject oldval = binder.getColumn(row, col);
if (oldval != null) {
for (Map.Entry<Pattern, ValueString> entry : map.entrySet()) {
if (entry.getKey().matcher(oldval.toString()).matches()) {
binder.setColumn(row, col, entry.getValue());
//break;
}
}
}
}
return row;
}
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
if (col < row.getCount()) {
BundleColumnBinder binder = getSourceColumnBinder(row);
ValueObject val = binder.getColumn(row, col);
for (String elt : contains) {
if (elt.length() > 0 && val.toString().indexOf(elt) != -1) {
binder.setColumn(row, col, val);
return row;
}
}
return null;
}
return row;
}
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
if (col < row.getCount()) {
BundleColumnBinder binder = getSourceColumnBinder(row);
ValueObject oldval = binder.getColumn(row, col);
if (oldval != null) {
ValueString newval = map.get(oldval.toString());
if (newval != null || mapToNull) {
binder.setColumn(row, col, newval);
}
}
}
return row;
}
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
Bundle rowClone = row;
if (last != null) {
BundleColumnBinder binder = getSourceColumnBinder(row);
boolean modified = false;
for (int i = 0; i < last.getCount() && row.getCount() > i; i++) {
ValueObject a = binder.getColumn(last, i);
ValueObject b = binder.getColumn(row, i);
if (a == null || b == null) {
continue;
}
if (a.toString().equals(b.toString())) {
if (modified == false) {
rowClone = cloneBundle(row);
}
binder.setColumn(row, i, null);
modified = true;
}
}
}
last = rowClone;
return row;
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
if (col < row.getCount()) {
long valLong = 0;
BundleColumnBinder binder = getSourceColumnBinder(row);
ValueObject val = binder.getColumn(row, col);
try {
valLong = Long.parseLong(val.toString());
} catch (Exception ex) {
ex.printStackTrace();
}
if (performOp(valLong, compValue, op)) {
binder.setColumn(row, col, val);
return row;
} else {
return null;
}
}
return row;
}
代码示例来源:origin: addthis/hydra
private long getBundleTime(Bundle bundle) {
long bundleTime = JitterClock.globalTime();
if (timeField != null) {
ValueObject vo = timeField.getField().getValue(bundle);
if (vo == null) {
log.debug("missing time {} in [{}] --> {}", timeField.getField(), bundle.getCount(), bundle);
} else {
bundleTime = timeField.toUnix(vo);
}
}
return bundleTime;
}
代码示例来源:origin: addthis/hydra
out = ValueFactory.create(outFormat.print(dt));
if (outcol >= row.getCount()) {
binder.appendColumn(row, out);
} else {
代码示例来源:origin: addthis/hydra
public void processRow(Bundle row) throws QueryException {
rowsin++;
cellsin += row.getCount();
if ((opPromise != null) && !opPromise.isDone()) {
firstOp.send(row);
}
if ((OP_MAXROWS > 0) && (rowsin > OP_MAXROWS)) {
throw new QueryException("query exceeded max input rows: " + OP_MAXROWS);
}
if ((OP_MAXCELLS > 0) && (cellsin > OP_MAXCELLS)) {
throw new QueryException("query exceeded max input cells: " + OP_MAXCELLS);
}
}
代码示例来源:origin: addthis/hydra
@Override
public Bundle rowOp(Bundle row) {
LinkedList<ValueObject> stack = new LinkedList<>();
long maxcol = row.getCount() - 1;
for (StringOp op : ops) {
switch (op.type) {
代码示例来源:origin: addthis/hydra
if (row.getCount() < max) {
continue;
代码示例来源:origin: addthis/hydra
private static void compareBundles(Bundle expect, Bundle got) {
for (BundleField field : expect.getFormat()) {
ValueObject v1 = expect.getValue(field);
ValueObject v2 = got.getValue(field);
assertEquals(v1, v2);
}
assertEquals("column count mismatch", expect.getCount(), got.getCount());
}
代码示例来源:origin: addthis/hydra
int index = 1 + colValues.indexOf(binder.getColumn(row, inputCol).asLong().getLong());
ValueObject rank = ValueFactory.create((double) index / colValues.size());
if (outputCol >= row.getCount()) {
binder.appendColumn(row, rank);
} else {
代码示例来源:origin: addthis/hydra
newrow.setValue(colField, col);
if (valcol != null && row.getCount() > pos) {
newrow.setValue(valField, rowView.get(pos));
代码示例来源:origin: addthis/hydra
public Bundle calculate(Bundle line) {
LinkedList<Numeric> stack = new LinkedList<>();
long maxcol = line.getCount() - 1;
try {
for (MathOp op : ops) {
内容来源于网络,如有侵权,请联系作者删除!