Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#Literals' - 2 code snippet(s) found

 Sample 1. Example of keywords , identifiers and literals in Java

int count = 0; // int is a keyword, count is an identifier and 0 is a literal

   Like      Feedback     keywords  identifiers  literals


 Sample 2. Code Sample / Example / Snippet of org.apache.calcite.rex.RexLiteral

    private String translateBinary2(String op, RexNode left, RexNode right) {

switch (right.getKind()) {

case LITERAL:

break;

default:

return null;

}

final RexLiteral rightLiteral = (RexLiteral) right;

switch (left.getKind()) {

case INPUT_REF:

final RexInputRef left1 = (RexInputRef) left;

String name = fieldNames.get(left1.getIndex());

return translateOp2(op, name, rightLiteral);

case CAST:

return translateBinary2(op, ((RexCall) left).operands.get(0), right);

default:

return null;

}

}


   Like      Feedback      org.apache.calcite.rex.RexLiteral



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner