mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
a547909d5e
commit
da4c1d3bf7
@ -45,10 +45,7 @@ import java.util.function.Supplier;
|
||||
* .with(Box::alis)
|
||||
* .build();
|
||||
* </pre>
|
||||
* <p>注意:本工具类支持调用的方法的参数数量不超过5个,更多的参数不利于阅读和维护。
|
||||
* 关于Java方法的参数个数限制似乎并没有明确统一的规范,网络上众说纷纭,这里取个相对平均的数5。
|
||||
* 特殊需要求可以基于此类进行拓展.
|
||||
* </p>
|
||||
* <p>注意:本工具类支持调用的方法的参数数量不超过1个,更多的参数不利于阅读和维护。</p>
|
||||
*
|
||||
* @author TomXin
|
||||
* @since 5.7.21
|
||||
|
@ -32,6 +32,7 @@ public class GenericBuilderTest {
|
||||
Assert.assertEquals(8, box.getWidth().intValue());
|
||||
Assert.assertEquals(7, box.getHeight().intValue());
|
||||
|
||||
// 对象修改
|
||||
Box boxModified = GenericBuilder
|
||||
.of(() -> box)
|
||||
.with(Box::setTitle, "Hello Friend!")
|
||||
@ -46,6 +47,7 @@ public class GenericBuilderTest {
|
||||
Assert.assertEquals(4, boxModified.getWidth().intValue());
|
||||
Assert.assertEquals(5, boxModified.getHeight().intValue());
|
||||
|
||||
// 多参数构造
|
||||
Box box1 = GenericBuilder
|
||||
.of(Box::new, 2048L, "Hello Partner!", 222, 333, 444)
|
||||
.with(Box::alis)
|
||||
|
Loading…
x
Reference in New Issue
Block a user