#Still need help with a proyect with lambda functions
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
well what is your question exactly
in the ContextInput class, you will have the withParameter method. It will request three parameters:
- the parameter's name:
String - a condition check:
Predicate<String>(I don't know exactly by the context is it's really aString, but the key thing here is thePredicate) - a function:
Function<String, Object>(I don't know for sure how this would work thought, it's just a guess, it could probably not be anObject)
I guess it's a String, since s -> Integer.valueOf(s) would only work with Strings
Help with a proyect with lambda functions
that's a statement, what's is it that u want / need help on ?
looks like it creates an actual coffeeOrder with 2 param's
what's the next section of the resultobject ?
Still nedd help with a proyect with lambda functions
Still need help with a proyect with lambda functions
In this method, you are defining how your ContextIntent will be converted in to your desired type (T)
so it's a Function<ContextIntent<T>, T>
@flat mortar
.resultObject(c -> new CoffeeOrder(c.<Integer>getParam("coffee-number"),
notice how the variable c has the method getParam, which they could only be got by the same object you setted theses params (through withParameter)
also, see how your getParam method has a generic behind it, it implies it's a conversion between Method -> E (where E is the method generic)
Closed the thread due to inactivity.
If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍