public boolean isNumber() { return isInteger() || isDouble(); }
protected VPackSlice makeKey() throws VPackKeyTypeException, VPackNeedAttributeTranslatorException { if (isString()) { return this; } if (isInteger()) { if (VPackSlice.attributeTranslator == null) { throw new VPackNeedAttributeTranslatorException(); } return translateUnchecked(); } throw new VPackKeyTypeException("Cannot translate key of this type"); }
@Override public Integer deserialize(final Response response) throws VPackException { // compatibility with ArangoDB < 3.4 // https://docs.arangodb.com/devel/Manual/ReleaseNotes/UpgradingChanges34.html Integer count = null; final VPackSlice body = response.getBody(); if (body.isObject()) { final VPackSlice deletedCount = body.get("deletedCount"); if (deletedCount.isInteger()) { count = deletedCount.getAsInt(); } } return count; }; };
@Override public ConsolidationPolicy deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context) throws VPackException { final VPackSlice type = vpack.get("type"); if (type.isString()) { final ConsolidationPolicy consolidate = ConsolidationPolicy .of(ConsolidationType.valueOf(type.getAsString().toUpperCase())); final VPackSlice threshold = vpack.get("threshold"); if (threshold.isNumber()) { consolidate.threshold(threshold.getAsDouble()); } final VPackSlice segmentThreshold = vpack.get("segmentThreshold"); if (segmentThreshold.isInteger()) { consolidate.segmentThreshold(segmentThreshold.getAsLong()); } return consolidate; } return null; } };
final ArangoSearchProperties properties = new ArangoSearchProperties(); final VPackSlice consolidationIntervalMsec = vpack.get("consolidationIntervalMsec"); if (consolidationIntervalMsec.isInteger()) { properties.setConsolidationIntervalMsec(consolidationIntervalMsec.getAsLong()); if (cleanupIntervalStep.isInteger()) { properties.setCleanupIntervalStep(cleanupIntervalStep.getAsLong());
continue; } else if (key.isInteger()) {
if (key.isString()) { res = key.compareString(attribute); } else if (key.isInteger()) {
} else if (key.isInteger()) {