All Questions
Tagged with expression java
558 questions
5
votes
1
answer
109
views
What is the difference between bar.int and bar.getInt() in Spring Expression Language (SpEL)?
I'm working with Spring Expression Language (SpEL) and noticed that expressions like @bar.int and @bar.getInt() both seem to access values from a Spring bean.
What is the actual difference between ...
0
votes
1
answer
77
views
how to use ? and : expression in java
I want to use ? : expression instead of if with 4 conditions in this code but i dont know how< any answers please?
import java.util.Scanner;
public class Ex13 {
public static void main(String[] ...
1
vote
1
answer
59
views
How to perform validation on the coding that does not support data beyond BMP character encoding
My database is utf8 and does not support inserting data beyond BMP character encoding such as emoticons. But I don't want to set the database to utf8mb4. How to perform validation on the backend that ...
0
votes
0
answers
108
views
How can I address map elements in JexlExpression?
I have a function that is suppose to evaluate some expressions in the loop using JexlEngine. It receive as a parameter List<Map<String,Object>> and run through that list.
Can I place the ...
0
votes
1
answer
87
views
Function to deep copy an Expression tree, including its parent hierarchy?
I want to deep copy an expression tree. I know the traditional way of doing it which works for the most part. Heres the basic version of the Expression tree:
public class Expression {
public ...
1
vote
1
answer
105
views
Replacement for PredExp on a list bin
I have a bin of type List. I want to query and get the records for which this bin has a value equal to variable 'val', lets say. Using PredExp this can be done using:
predExps = Arrays.asList(
PredExp....
1
vote
1
answer
113
views
PredExp vs Expression - Aerospike Client (list of integers)
What would be the Expression substitute for the below code which uses PredExp for aerospike client
predExps = Arrays.asList(PredExp.integerVar("v"), PredExp.integerValue((Long) fieldValue), ...
1
vote
2
answers
158
views
Parentheses and Unary Operator Precedence in Java
As per the order of precedence of operators, () is evaluated before unary operators like ++ or --. But let us consider the following code:-
int x = 1;
x = 2 + (x++);
If x++ is executed first, the ...
1
vote
1
answer
119
views
Problems with comparisons in ANTLR4 grammar
I've build a small parser for writing filters in my application and most of it works fine. But now I noticed something weird. I have comparisons like '==', '!=', '>=' etc and they also work fine. ...
0
votes
1
answer
87
views
How to sort a 2d array using the second index for tiebreaks
Anyone know the correct syntax for sorting an 2d array using Lambdas in java where in the need to tiebreak we move on to the second element?
like if the array is { {1,0}, {2,5}, {1,55}}
it becomes {{1,...
1
vote
3
answers
874
views
How to apply a tmap variable to multiple output fields in Talend?
I'm working with tmap and I was wondering if it's possible to use this simple use case:
I create a variable in central tmap section, and I apply the same variable to multiple output fields.
In the ...
-3
votes
1
answer
42
views
XPath expression with where statement
I have xml and I want to get, using xpath expression, text from Text node only if Text_2 contains elements. Is there any possibility? I couldn't find out any.
<List>
<Response>
<...
2
votes
1
answer
233
views
Evaluate JSON object with expression with variable name
We need to evalue json object expression in java
we have following source json object
{
"model":"abc",
"variant":"m1",
"stage":2,
"a"...
-1
votes
1
answer
31
views
Java regular Expression End of String
I want to replace some part of a string, but only if the part is the last part of the string.
Example:
public class Test {
public static void banana(){
String test = "I love Banana&...
-3
votes
1
answer
570
views
Efficient algorithm for expression parser (Java)
I am trying to design an algorithm that can parse an expression in the form of a String. I want to be able to extract the operands and the operation from the given expression. Also, I want the ...