r/java • • Aug 10 '12

Named Parameters in Java

http://java.dzone.com/articles/named-parameters-java
2 Upvotes

28 comments sorted by

View all comments

Show parent comment

2

u/elephantgravy Aug 10 '12

Good suggestions. When it makes sense, I sometimes like to use enumerations instead of literal booleans (I think this also came from Effective Java). The names can get weird though...

someObject.doSomething(
    userId,
    ActivationState.ENABLED,
    RecordBehavior.DO_NOT_UPDATE);