【发布时间】:2011-09-08 12:17:13
【问题描述】:
考虑以下示例:
class Foo
{
private Bar x;
// ...
public Bar getAndResetX()
{
Bar result = x;
x = new Bar();
return result;
}
}
此类方法是否有既定的命名约定?比如yieldX、transferX 什么的?
【问题讨论】:
标签: java naming-conventions transfer getter ownership