Re: Contributing to Apache Commons (Beginner task)

2017-03-23 Thread Gilles
Hello. On Thu, 23 Mar 2017 21:02:11 +0100, Vladimir Kaplarevic wrote: Hello, I am looking to contribute to Apache Commons and start of with some basic beginner task. I came across this: https://helpwanted.apache.org/task.html?532e1a732ca32a4e35fc7fc0e4c9373b6af1c17d If possible, I would lik

Contributing to Apache Commons (Beginner task)

2017-03-23 Thread Vladimir Kaplarevic
Hello, I am looking to contribute to Apache Commons and start of with some basic beginner task. I came across this: https://helpwanted.apache.org/task.html?532e1a732ca32a4e35fc7fc0e4c9373b6af1c17d If possible, I would like to help out but I am not sure about the steps that I need to take here - a

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread Javen O'Neal
Because either (1) UnmodifiableSet implents the Set interface and throws an Invalid operations working at runtime for methods that would modify the set or (2) UnmodifiableSet does not implement the full Set interface, making it possible to catch errors at compile time, but also making it impossible

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread sebb
On 23 March 2017 at 15:02, Lukasz Lenart wrote: > 2017-03-23 14:37 GMT+01:00 sebb : >> Not sure I follow. >> >> What exactly can the compiler check? > > You can declare a variable or a field of type UnmodifiableSet but > there is no way to create instance of the type UnmodifiableSet - there > is n

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread Lukasz Lenart
2017-03-23 14:37 GMT+01:00 sebb : > Not sure I follow. > > What exactly can the compiler check? You can declare a variable or a field of type UnmodifiableSet but there is no way to create instance of the type UnmodifiableSet - there is no such constructor neither factory method :) Regards -- Łu

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread Matt Sicker
I think the idea is giving a subset of the Set methods that are read-only. Any write operations wouldn't be available on the interface, so you couldn't compile it. On 23 March 2017 at 08:37, sebb wrote: > On 23 March 2017 at 07:48, Lukasz Lenart wrote: > > Hi, > > > > I see that the Collections

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread sebb
On 23 March 2017 at 07:48, Lukasz Lenart wrote: > Hi, > > I see that the Collections4 provides those classes. Anyway I wonder > why I the constructor is private and why the factory method > unmodifiableSet() returns Set? > > I would love to use those classes directly, to be straightforward that >

[Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread Lukasz Lenart
Hi, I see that the Collections4 provides those classes. Anyway I wonder why I the constructor is private and why the factory method unmodifiableSet() returns Set? I would love to use those classes directly, to be straightforward that I expect the UnmodifiableSet and not just a Set. What about ad