产生该类型的对象。可传入其它类型的参数来进行产生。(如果某构造器被设置为静态的,也成为工厂方法factory method)
creator : t* → T
既可以为构造函数,也可以为静态函数
2.生产器(producer)产生该类型的对象。必须至少传入一个该类型的对象,传入或不传入其它类型的参数。
producer : T+, t* → T
subString()
concat()
产生一个其它类型的数据。必须至少传入一个该类型的对象,传入或不传入其它类型的参数。
observer : T+, t* → t
length()
size()
contains
将传入该类型的对象的值进行改变。必须至少传入一个该类型的对象。
mutator : T+, t* → void | t | T
add()
remove()
int is immutable, so it has no mutators. – creators: the numeric literals 0 , 1 , 2 , … – producers: arithmetic operators + , - , * , / – observers: comparison operators == , != , < , > – mutators: none (it’s immutable) String is Java’s string type. String is immutable. – creators: String constructors – producers: concat , substring , toUpperCase – observers: length , charAt – mutators: none



