We’re rewarding the question askers & reputations are being recalculated! Read more.
3 deleted 5 characters in body
source | link

AcademicallyAcademic: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

So: No, you cannot throw an UnsupportedOperationException. The exception should not even exist. "Unsupported Operations" and "Not Implemented Methods" are clearly communicated by virtue of the fact that I did not code the implementationinterface to support them. Such things are bubble gum and duct tape over poor designs.

Pragmatic: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface. Useinterface;use at your own peril. You

One should design alltheir systems as if all programmers are psychotic ax murderers who know where you livethe designer lives. You would not be the first person to do such a thing, and anyone with Win32 experience would likely give you a sigh, an eyeroll, and some muttered epithets under their breath. Then they'd move on. You'd probably be safe.

Academically: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

So: No, you cannot throw an UnsupportedOperationException. The exception should not even exist. "Unsupported Operations" and "Not Implemented Methods" are clearly communicated by virtue of the fact that I did not code the implementation to support them. Such things are bubble gum and duct tape over poor designs.

Pragmatic: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface. Use at your own peril. You should design all systems as if programmers are psychotic ax murderers who know where you live. You would not be the first person to do such a thing, and anyone with Win32 experience would likely give you a sigh an eyeroll and some muttered epithets under their breath. You'd probably be safe.

Academic: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

So: No, you cannot throw an UnsupportedOperationException. The exception should not even exist. "Unsupported Operations" and "Not Implemented Methods" are clearly communicated by virtue of the fact that I did not code the interface to support them. Such things are bubble gum and duct tape over poor designs.

Pragmatic: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface;use at your own peril.

One should design their systems as if all programmers are psychotic ax murderers who know where the designer lives. You would not be the first person to do such a thing, and anyone with Win32 experience would likely give you a sigh, an eyeroll, and some muttered epithets under their breath. Then they'd move on. You'd probably be safe.

2 added 220 characters in body
source | link

AcademicallyAcademically: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

The Academic answer isSo: No, you cannot throw an UnsupportedOperationException. The exception should not even exist. "Unsupported Operations" and "Not Implemented Methods" are clearly communicated by virtue of the fact that I did not code the implementation to support them. Such things are bubble gum and duct tape over poor designs.

The Pragmatic answerPragmatic: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface. Use at your own peril. You should design all systems as if programmers are psychotic ax murderers who know where you live. You would not be the first person to do such a thing, and anyone with Win32 experience would likely give you a sigh an eyeroll and some muttered epithets under their breath. You'd probably be safe.

Academically: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

The Academic answer is: No, you cannot throw an UnsupportedOperationException. The exception should not even exist

The Pragmatic answer: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface.

Academically: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

So: No, you cannot throw an UnsupportedOperationException. The exception should not even exist. "Unsupported Operations" and "Not Implemented Methods" are clearly communicated by virtue of the fact that I did not code the implementation to support them. Such things are bubble gum and duct tape over poor designs.

Pragmatic: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface. Use at your own peril. You should design all systems as if programmers are psychotic ax murderers who know where you live. You would not be the first person to do such a thing, and anyone with Win32 experience would likely give you a sigh an eyeroll and some muttered epithets under their breath. You'd probably be safe.

1
source | link

Academically: if part of your interface does not need to be implemented to satisfy your interface requirements, then your interface is poorly defined for your use case. What you really have is a different interface.

The Academic answer is: No, you cannot throw an UnsupportedOperationException. The exception should not even exist

The Pragmatic answer: Implementing only part of an interface rather than the whole one is definitely a code smell and introduces the risk that a consumer of your implementation will experience behavior that should not be expected from your interface.