Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52b0fdb

Browse filesBrowse files
committed
README tweaks
1 parent e0b2db4 commit 52b0fdb
Copy full SHA for 52b0fdb

File tree

Expand file treeCollapse file tree

2 files changed

+23
-11
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+23
-11
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+22-10Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Compare Java to other LINQ examples written in:
1111

1212
### Running the examples
1313

14-
The results of each of the LINQ examples are logged in an Android device:
14+
Each of the LINQ Examples can be run from the included Android App with its results logged to the screen:
1515

1616
![](https://raw.githubusercontent.com/ServiceStack/Assets/master/img/wikis/java/linq-examples-screenshot.png)
1717

18-
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).
1919

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).
2121

2222

2323
### Contents
@@ -39,21 +39,33 @@ The samples below mirrors the C# LINQ samples layout with the names of the top-l
3939
#### [LINQ - Query Execution](https://github.com/mythz/java-linq-examples/blob/master/src/app/src/main/java/servicestack/net/QueryExecution.java) / [MSDN C#](http://code.msdn.microsoft.com/LINQ-Query-Execution-ce0d3b95)
4040
#### [LINQ - Join Operators](https://github.com/mythz/java-linq-examples/blob/master/src/app/src/main/java/servicestack/net/JoinOperators.java) / [MSDN C#](http://code.msdn.microsoft.com/LINQ-Join-Operators-dabef4e9)
4141

42-
## Functional Utils in Java
42+
## Java Functional Utils
4343

44-
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.
4545

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:
4751

4852
dependencies {
4953
compile fileTree(dir: 'libs', include: ['*.jar'])
5054
compile 'net.servicestack:android:1.0.13'
5155
}
5256

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
5567

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:
5769

5870
```java
5971
import static net.servicestack.func.Func.*;
@@ -67,7 +79,7 @@ For a side-by-side comparison, the original **C#** source code is displayed abov
6779
- Outputs ending with `...` illustrates only a partial response is displayed.
6880
- 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)
6981

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.
7183

7284

7385
LINQ - Restriction Operators

‎src/app/src/main/java/servicestack/net/javalinqexamples/MainActivity.java

Copy file name to clipboardExpand all lines: src/app/src/main/java/servicestack/net/javalinqexamples/MainActivity.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void Run(Object linqExamples){
9191
scrollView.post(new Runnable() {
9292
@Override
9393
public void run() {
94-
// scrollView.fullScroll(View.FOCUS_DOWN);
94+
scrollView.fullScroll(View.FOCUS_DOWN);
9595
}
9696
});
9797
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.