If we had added a getValue method to class Leaf, we would either have to return some sort of flag value indicating that the method application is non-sensical or actually throw an exception.
如果我们已经向Leaf类添加了getValue方法,我们要么是不得不返回一些类型的标志值表明此方法应用是无意义的,要么是实际抛出一个异常。
If we had added a getValue method to class Leaf, we would either have to return some sort of flag value indicating that the method application is non-sensical or actually throw an exception.
如果我们已经向Leaf类添加了getValue方法,我们要么是不得不返回一些类型的标志值表明此方法应用是无意义的,要么是实际抛出一个异常。
应用推荐