- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
/** * or : expr '||' expr */ Expr or() { Expr expr = and(); for (Tok tok=peek(); tok.sym==Sym.OR; tok=peek()) { move(); expr = new Logic(Sym.OR, expr, and(), location); } return expr; }
public static boolean isFalse(Object v) { return !isTrue(v); } }
public class LogicAsync extends AsyncTask<Void, Integer, Void> { @Override protected Void doInBackground(Void... p) { Logic logic = new Logic(); logic.loadArrays(); publishProgress(10); //10% done try { Thread.sleep(1000); } catch { } logic.sortArraysAndMatrix(); publishProgress(20); //20% done logic.copyAndSortWeightages(); publishProgress(30); logic.finalData(); publishProgress(100); } @Override protected void onProgressUpdate(Integer... progress) { updateUIWithPercent(progress[0]); } }
public static void ViewAll() { Logic aref = new Logic(); List<Games> gamelist = aref.ViewAllGames(); for(Games g : gamelist){ System.out.println(); System.out.println("Game Id: " + g.getGameId()); System.out.println("Title: " + g.getTitle()); System.out.println("Rating: " + g.getRating()); System.out.println("Platform: "+ g.getPlatform()); System.out.println("Developer: "+ g.getDeveloper()); } }
/** * and : expr '&&' expr */ Expr and() { Expr expr = equalNotEqual(); for (Tok tok=peek(); tok.sym==Sym.AND; tok=peek()) { move(); expr = new Logic(Sym.AND, expr, equalNotEqual(), location); } return expr; }
/** * unary : ('!' | '+' | '-'| '++' | '--') expr */ Expr unary() { Tok tok = peek(); switch (tok.sym) { case NOT: move(); return new Logic(tok.sym, unary(), location); case ADD: case SUB: move(); return new Unary(tok.sym, unary(), location).toConstIfPossible(); case INC: case DEC: move(); return new IncDec(tok.sym, false, incDec(), location); default: return incDec(); } }
@Test public void testDoSomethingInterestingAsyncIncrementsParameter() { ILogic logic = new Logic(); ICallback callback = mock(ICallback.class); logic.doSomethingInterestingAsync(SOME_NUMBER, callback); verify(callback, timeout(1000)).response(SOME_NUMBER + 1); }
Object evalNot(Scope scope) { return ! isTrue(right.eval(scope)); }
public class GUI() { this.handler = new Handler(this); this.logic = new Logic(this); handler.setLogic(logic); logic.setHandler(handler); }
public Object eval(Scope scope) { return Logic.isTrue(cond.eval(scope)) ? exprOne.eval(scope) : exprTwo.eval(scope); } }
Logic login = new Logic(); ... MyGUI gui = new MyGUI(logic); ...
public void exec(Env env, Scope scope, Writer writer) { if (Logic.isTrue(cond.eval(scope))) { stat.exec(env, scope, writer); } else if (elseIfOrElse != null) { elseIfOrElse.exec(env, scope, writer); } } }