有没有一个简单的术语代表“非破坏性二传手”?

问题描述

在这样的代码中,library(ggplot2) dat <- read.csv('https://raw.githubusercontent.com/rnorouzian/e/master/sng.csv') ggplot(dat)+aes(x=A,y = y,fill = group)+geom_point()+ # How can I have `B` and `C` next to `A` with other colors facet_wrap(~group) 方法通常通常被称为“ setter”,但是setValue方法(即返回其字段已更改的新对象)的方式是打电话一般吗?

withValue

解决方法

这些方法的常用前缀为with

MyClass alternateVersion = myClass.withValue(5);