You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can choose to run specific examples by commenting the sections you're not interested in [MainActivity.java](https://github.com/mythz/java-linq-examples/blob/432dfeb0ea3c95ecdd8e007886a77d1508d6f312/src/app/src/main/java/servicestack/net/javalinqexamples/MainActivity.java#L54-L67).
18
+
Run the included [Android Studio project](https://github.com/mythz/java-linq-examples/tree/master/src) to execute all the examples. You can also choose to only run specific examples by commenting out any of the sections you're not interested in [MainActivity.java](https://github.com/mythz/java-linq-examples/blob/432dfeb0ea3c95ecdd8e007886a77d1508d6f312/src/app/src/main/java/servicestack/net/javalinqexamples/MainActivity.java#L54-L67).
19
19
20
-
To see the full output of all the examples, run the [Android Studio project](https://github.com/mythz/java-linq-examples/tree/master/src) locally. A copy of the example output is also available in [linq-log.txt](https://raw.githubusercontent.com/mythz/java-linq-examples/master/linq-log.txt).
20
+
A copy of the LINQ examples output is also available in [linq-log.txt](https://raw.githubusercontent.com/mythz/java-linq-examples/master/linq-log.txt).
21
21
22
22
23
23
### Contents
@@ -39,21 +39,33 @@ The samples below mirrors the C# LINQ samples layout with the names of the top-l
Unlike many languages that support a functional-style, Java doesn't have many LINQ-like utils built-in by default, Java's also not very extensible and the lack of proper Type Inference, Type Erasure and Closures in Java 1.7 makes the equivalent Java source code particularly more verbose.
44
+
Unlike many modern languages supporting a functional-style, Java doesn't have any LINQ-like utils built-in by default. It's also not very extensible which combined with the lack of proper Type Inference, Type Erasure and Closures in Java 1.7 makes the equivalent Java source code particularly more verbose.
45
45
46
-
To make development in Java more enjoyable we've added common functional utils to simplify Functional programming in Java inside [ServiceStack's Java and Android Client Library](https://github.com/ServiceStack/ServiceStack/wiki/Java-Add-ServiceStack-Reference). This can be added to your Android Studio or **build.gradle** dependency with:
46
+
To improve the development experience in Java, we've added common functional utils to simplify programming in a functional style inside [ServiceStack's Java and Android Client Library](https://github.com/ServiceStack/ServiceStack/wiki/Java-Add-ServiceStack-Reference): **net.servicestack:android**.
47
+
48
+
### Install
49
+
50
+
To include it in your Android Studio project, add it to your **build.gradle** dependency, e.g:
47
51
48
52
dependencies {
49
53
compile fileTree(dir: 'libs', include: ['*.jar'])
50
54
compile 'net.servicestack:android:1.0.13'
51
55
}
52
56
53
-
This library also gets automatically added when Adding a Remote Service Reference with [Intellij IDEA](https://github.com/ServiceStack/ServiceStack/wiki/Java-Add-ServiceStack-Reference#servicestack-idea-android-studio-plugin
54
-
) as well as [Maven projects in Eclipse](https://github.com/ServiceStack/ServiceStack.Java/tree/master/src/ServiceStackEclipse#eclipse-integration-with-servicestack).
57
+
Pure Java projects should add the **net.servicestack:client** dependency instead:
58
+
59
+
dependencies {
60
+
compile 'net.servicestack:client:1.0.13'
61
+
}
62
+
63
+
Alternatively this library is also automatically added when Adding a Typed Remote Service Reference with ServiceStack IDE Plugins for [Intellij IDEA](https://github.com/ServiceStack/ServiceStack/wiki/Java-Add-ServiceStack-Reference#servicestack-idea-android-studio-plugin
64
+
) and [Eclipse Maven projects](https://github.com/ServiceStack/ServiceStack.Java/tree/master/src/ServiceStackEclipse#eclipse-integration-with-servicestack).
65
+
66
+
### Usage
55
67
56
-
Once the dependency is added you can add a static import and access all the functional utils used in the LINQ examples below with:
68
+
Once the dependency is added you can add a static import to access all the functional utils used in the LINQ examples below:
57
69
58
70
```java
59
71
import staticnet.servicestack.func.Func.*;
@@ -67,7 +79,7 @@ For a side-by-side comparison, the original **C#** source code is displayed abov
67
79
- Outputs ending with `...` illustrates only a partial response is displayed.
68
80
- The C# ObjectDumper util used is downloadable from MSDN - [ObjectDumper.zip](http://code.msdn.microsoft.com/Visual-Studio-2008-C-d295cdba/file/46086/1/ObjectDumper.zip)
69
81
70
-
The Java LINQ Examples are limited to Java 1.7 so they're usable with Java 1.7 on Android.
82
+
The Java LINQ Examples are limited to Java 1.7 so they're available on Android.
0 commit comments