This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package classes | |
import Condition._ | |
import scala.beans.BeanProperty | |
object Test2 extends App { | |
val facts = new Facts() | |
facts.setBalance(23) | |
facts.setName("Ale") | |
print (facts.balance > 4 and facts.name != "Ale") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.lang.GroovyRuntimeException; | |
import groovy.util.Eval; | |
import java.util.function.Predicate; | |
public class Test | |
{ | |
public static void main(String[] args) | |
{ | |
final Predicate<Facts> predicate = getPredicate("facts.name == 'Ale' && facts.subFacts.balance < 100"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
private static class HttpResponseFutureCallback implements FutureCallback<HttpResponse> | |
{ | |
private final HttpUriRequest request; | |
private final ListenableFutureCallbackRegistry<ClientHttpResponse> callbacks = | |
new ListenableFutureCallbackRegistry<ClientHttpResponse>(); | |
private HttpResponseFutureCallback(final HttpUriRequest request) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.fromJSON = function (json) | |
{ | |
var result = undefined; | |
if (Ember.typeOf(json) === 'array') | |
{ | |
result = Ember.A(); | |
json.forEach(function (el){ | |
result.pushObject(App.fromJSON(el)); | |
}); | |
} |