I have a Permissions
class in Java with methods in fluent style like this:
somePermissions.setRead(true).setWrite(false).setExecute(true)
The question is, whether I should name these methods set{Property}
or only {property}
. The latter would look like this:
somePermissions.read(true).write(false).execute(true)
If I look at these methods separately I would expect that read
reads something, but on the other hand it is closer to the intention to have something like named paramaters like in Scala:
Permission(read=true, write=false, execute=true)