Add a method to get all the keys (aka keySet()) to the Accessible interface #46

Closed
bbossola opened this Issue Jul 28, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@bbossola
Contributor

bbossola commented Jul 28, 2013

The Accessible interface is cool but it lacks a method to programmatic-ally get a list of all the keys, just in case you need to show the configuration in any different way from the basic list mechanism already present

@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano Jul 29, 2013

Owner

👍 pretty easy, I'll do that asap. I will return a "snapshot" of the keySet, not the keySet itself as returned by Properties.keySet(). I think it should be fine too, and will prevent unchecked modifications (thread safety, etc)

Owner

lviggiano commented Jul 29, 2013

👍 pretty easy, I'll do that asap. I will return a "snapshot" of the keySet, not the keySet itself as returned by Properties.keySet(). I think it should be fine too, and will prevent unchecked modifications (thread safety, etc)

lviggiano added a commit that referenced this issue Jul 29, 2013

implemented change req. #46 propertyNames()
in interface Accessible

    Set<String> propertyNames();

This differs from the correspondent method in java.util.Properties
since Properties.propertyNames returns an Enumeration<?> but property
names are required to be Strings. In JDK 1.6 the method
`Set<String> stringPropertyNames()` has been introduced but since
we require JDK 1.5+ support I couldn't just delegate and I had to
reimplement it. So I chosed to implement it with the proper method
signature, even though it doesn't match java.util.Properties
interface.
@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano Jul 29, 2013

Owner

implemented on master, Accessible.propertyNames()

Owner

lviggiano commented Jul 29, 2013

implemented on master, Accessible.propertyNames()

@lviggiano lviggiano closed this Jul 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment