/** * {@inheritDoc} */ @Override public BBoolean isEmpty() { return new BBoolean(omNode == null); }
/** * {@inheritDoc} */ @Override public BBoolean isSingleton() { return new BBoolean(true); }
/** * {@inheritDoc} */ @Override public BBoolean isEmpty() { return new BBoolean(sequence.size() == 0); }
public ResponseCacheControlStruct setMustRevalidate(boolean mustRevalidate) { responseCacheControl.put(RES_CACHE_CONTROL_MUST_REVALIDATE_FIELD, new BBoolean(mustRevalidate)); return this; }
@Override public void onPushPromiseAvailability(boolean isPromiseAvailable) { context.setReturnValues(new BBoolean(isPromiseAvailable)); callback.notifySuccess(); } }
@Override public void execute(Context context) { String param1 = context.getStringArgument(0); String suffix = context.getStringArgument(1); BBoolean booleanValue = new BBoolean(param1.endsWith(suffix)); context.setReturnValues(booleanValue); } }
@Override public void execute(Context context) { String param1 = context.getStringArgument(0); String subString = context.getStringArgument(1); BBoolean isContains = new BBoolean(param1.contains(subString)); context.setReturnValues(isContains); } }
@Override public void execute(Context context) { String string1 = context.getStringArgument(0); String anotherString = context.getStringArgument(1); BBoolean booleanValue = new BBoolean(string1.equalsIgnoreCase(anotherString)); context.setReturnValues(booleanValue); } }
public void execute(Context context) { BTable table = (BTable) context.getRefArgument(0); context.setReturnValues(new BBoolean(table.hasNext())); } }
public ResponseCacheControlStruct setNoCache(boolean noCache, String[] noCacheFields) { responseCacheControl.put(RES_CACHE_CONTROL_NO_CACHE_FIELD, new BBoolean(noCache)); responseCacheControl.put(RES_CACHE_CONTROL_NO_CACHE_FIELDS_FIELD, new BValueArray(noCacheFields)); return this; }
@Override public void execute(Context context) { BFuture future = (BFuture) context.getRefArgument(0); context.setReturnValues(new BBoolean(future.cancel())); }
@Override public void execute(Context context) { BFuture future = (BFuture) context.getRefArgument(0); context.setReturnValues(new BBoolean(future.isDone())); }
@Override public void execute(Context context) { BFuture future = (BFuture) context.getRefArgument(0); context.setReturnValues(new BBoolean(future.isCancelled())); }
@Override public void execute(Context context) { String configKey = context.getStringArgument(0); boolean containsKey = ConfigRegistry.getInstance().contains(configKey); context.setReturnValues(new BBoolean(containsKey)); } }
public void execute(Context ctx) { BMap<String, BValue> map = (BMap<String, BValue>) ctx.getRefArgument(0); String key = ctx.getStringArgument(0); ctx.setReturnValues(new BBoolean(map.hasKey(key))); } }
public static void populateEndpoint(WebSocketConnection webSocketConnection, BMap<String, BValue> webSocketEndpoint) { webSocketEndpoint.put(WebSocketConstants.LISTENER_ID_FIELD, new BString(webSocketConnection.getChannelId())); webSocketEndpoint.put(WebSocketConstants.LISTENER_NEGOTIATED_SUBPROTOCOLS_FIELD, new BString(webSocketConnection.getNegotiatedSubProtocol())); webSocketEndpoint.put(WebSocketConstants.LISTENER_IS_SECURE_FIELD, new BBoolean(webSocketConnection.isSecure())); webSocketEndpoint.put(WebSocketConstants.LISTENER_IS_OPEN_FIELD, new BBoolean(webSocketConnection.isOpen())); }
private void checkDirtiness(DataContext dataContext, HttpCarbonMessage outboundRequestMsg) { BMap<String, BValue> requestStruct = ((BMap<String, BValue>) dataContext.context. getNullableRefArgument(HttpConstants.REQUEST_STRUCT_INDEX)); String contentType = HttpUtil.getContentTypeFromTransportMessage(outboundRequestMsg); outboundRequestMsg.setIoException(null); if (requestStruct != null) { if (dirty(requestStruct)) { cleanOutboundReq(outboundRequestMsg, requestStruct, contentType); } else { requestStruct.put(HttpConstants.REQUEST_REUSE_STATUS_INDEX, new BBoolean(HttpConstants.DIRTY_REQUEST)); } } }
public void execute(Context ctx) { BMap<String, BValue> map = (BMap<String, BValue>) ctx.getRefArgument(0); try { boolean isRemoved = map.remove(ctx.getStringArgument(0)); ctx.setReturnValues(new BBoolean(isRemoved)); } catch (BLangFreezeException e) { throw new BallerinaException(e.getMessage(), "Failed to remove element from map: " + e.getDetail()); } } }
public RequestCacheControlStruct(BMap<String, BValue> requestCacheControl) { this.requestCacheControl = requestCacheControl; // Initialize the struct fields to default values we use requestCacheControl.put(REQ_CACHE_CONTROL_NO_TRANSFORM_FIELD, new BBoolean(TRUE)); requestCacheControl.put(REQ_CACHE_CONTROL_MAX_AGE_FIELD, new BInteger(-1)); requestCacheControl.put(REQ_CACHE_CONTROL_MAX_STALE_FIELD, new BInteger(-1)); requestCacheControl.put(REQ_CACHE_CONTROL_MIN_FRESH_FIELD, new BInteger(-1)); }
public RequestCacheControlStruct(StructureTypeInfo structInfo) { requestCacheControl = BLangVMStructs.createBStruct(structInfo); // Initialize the struct fields to default values we use requestCacheControl.put(REQ_CACHE_CONTROL_NO_TRANSFORM_FIELD, new BBoolean(TRUE)); requestCacheControl.put(REQ_CACHE_CONTROL_MAX_AGE_FIELD, new BInteger(-1)); requestCacheControl.put(REQ_CACHE_CONTROL_MAX_STALE_FIELD, new BInteger(-1)); requestCacheControl.put(REQ_CACHE_CONTROL_MIN_FRESH_FIELD, new BInteger(-1)); }