Skip to content

Commit aa67068

Browse files
authored
Update README.md
1 parent e6c551e commit aa67068

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,27 @@ public class Example(){
5151
}
5252
}
5353
```
54-
Please be aware of the exceptions thrown by the methods.
54+
55+
There is also the option to get all users sharing a list:
56+
```Java
57+
public class Example(){
58+
59+
@SneakyThrows
60+
public static void main(String[] args){
61+
62+
// ...
63+
64+
// Get users
65+
List<User> users = myList.getAllUsers();
66+
67+
// ...
68+
}
69+
}
70+
71+
```
72+
73+
74+
Please be aware of the exceptions thrown by these methods.
5575
In this example I used the `@SneakyThrows` annotation from lombok so I don't have a massive overhead using try-catch etc.
5676

5777
You have to catch and handle those exceptions by yourself (or annotate your method with at `@SneakyThrows` if your application allows that without it being to dirty)

0 commit comments

Comments
 (0)