“实现包装方法”是什么意思? [英] What is meant by "implement a wrapper method"?
本文介绍了“实现包装方法”是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经获得了一个编程任务,我要做的一件事就是实现方法,它是一个包装器方法,它依赖于另一种方法来从最低到最高对坐标进行排序。我不确定实现包装器方法的确切含义。
I have been given a programming assignment and one of the things I have to do is implement method which a wrapper method which relies on another method to sort the coordinates from lowest to highest. I am unsure on what exactly is meant by implementing a wrapper method.
static void sortCoordsByZ(double[][] coords) {
//implement the wrapper method for the recursive sort method. all work is done the recursive sort method
}
static void recursiveSort(double[][] coords, int lo, int hi) {
//recursive sort method
}
推荐答案
A wrapper method is an adapter or a façade; it provides an alternative interface for an existing method.
您被要求编写外观(外观) - 为不需要的客户提供更简单的界面指定高值和低值。
You've been asked to write a façade (facade) - to provide a simpler interface for clients that don't need to specify high and low values.
这篇关于“实现包装方法”是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文