M
Martha Goys
I may be over-thinking this, but had a question regarding best design of
a interface. The function of this interface is very simple: take an
object and produce another object from it (input and output are
different types, but this is not important here).
I'm debating on one of the following approaches:
A)
SomeClassA getOutput(SomeClassB input)
or
B)
void setInput(SomeClassB input)
SomeClassA getOutput()
The plus I see with approach A is its simplicity, and that the flow is
very obvious.
The pluses I see with approach B is the use of bean syntax, which is
very useful in reflection, etc.
I suppose what's throwing me is that since this is currently just an
interface, it's hard to see if there's really much difference in the two
approaches above.
Any words of wisdom?
Thanks,
M
a interface. The function of this interface is very simple: take an
object and produce another object from it (input and output are
different types, but this is not important here).
I'm debating on one of the following approaches:
A)
SomeClassA getOutput(SomeClassB input)
or
B)
void setInput(SomeClassB input)
SomeClassA getOutput()
The plus I see with approach A is its simplicity, and that the flow is
very obvious.
The pluses I see with approach B is the use of bean syntax, which is
very useful in reflection, etc.
I suppose what's throwing me is that since this is currently just an
interface, it's hard to see if there's really much difference in the two
approaches above.
Any words of wisdom?
Thanks,
M