Public Service Reminder: Making all fields of an object final does not necessarily make the object immutable -- all fields must also be primitive types or references to immutable objects.
PublicServiceReminder:让一个对象的所有字段都为final并不一定使得这个对象不可变 —— 所有的字段还必须是原语类型或是对不可变对象的引用。
One of these is the immutable attribute.
其中之一就是不可变属性。
A tuple, however, is immutable.
然而,tuple是不可变的。
Strictly speaking, the order in which you undertake phases in RUP is immutable.
严格来说,在RUP 中您采用各阶段的顺序是不可变的。
Tagged immutable sets and maps
可标记的不可变set和map
Create and return an immutable physical resource representation.
创建和返回一个不可变的物理资源表示。
If you have an immutable object, you must set whatever state it will contain in the constructor.
如果您有一个不可变对象,则必须要在构造函数中设置该对象将包含的任何状态。
This pattern requires that the value being published be effectively immutable — that its state not change after publication.
这个模式要求被发布的值是有效不可变的——即值的状态在发布后不会更改。
That article demonstrated the tuple, which is an immutable sequence.
这篇文章演示了tuple,这是一个不可变的序列。
Scala encourages you to use immutable values whenever possible.
Scala鼓励你在任何可能的时候使用不可变的值。
These interfaces are intended to represent views into a collection, but they do not ensure the collection itself is immutable.
这些接口是用来表示针对某集合的一些视图,但是接口并不确保该集合本身是不变的。
Making the message classes immutable and cloning mutable references such as arrays at construction time would have prevented this problem.
使得消息类不可变并在构造时克隆像数组这样的可变引用,就可以防止该问题。
In a resource oriented system requests are made for resources and concrete, immutable resource representations are returned.
在面向资源的系统中,我们对资源发出请求,然后系统将具体的、不变的资源表示返回给我们。
VB allows both mutable and immutable anonymous types, with subtly different rules for each.
而VB却同时支持可变和不可变的匿名类型,对于这两种匿名类型,实现和使用的规则也略有不同。
When used as constructor parameters, the mutable or immutable variables specified will be initialized when an object is instantiated.
当作为构造函数参数时,这些可变或者不可变的变量会在一个对象被实例化的时候被初始化。
Because BigDecimal objects are immutable, each of these methods produces a new BigDecimal object.
由于BigDecimal对象是不可变的,这些方法中的每一个都会产生新的BigDecimal对象。
As immutable sequences, both tuple and string objects can't be modified once they're created.
作为不可变的序列,tuple和string对象在创建之后便无法修改。
One common type of list is called a tuple, and as noted, it's immutable.
一种常用的列表类型是tuple,它是不可变的。
In this article, I introduced the Python string, which is an immutable sequence of characters.
在本文中,我介绍了python字符串,它是一种不变的字符序列。
Because Clojure trees are immutable data structures, any manipulation requires that we return a new, modified tree.
由于clojure树是不可变的数据结构,因此任何操作都需要返回一个经过修改的新树。
Part 2 of this series, Discover Python, Part 2, introduced the tuple, which also was an immutable sequence.
本系列的第 2部分探索Python,第 2 部分介绍了tuple,它也是一个不变的序列。
String is immutable and if we are doing work that requires mutations, StringBuffer is a less costly alternative.
String是不可变的,但如果我们的工作需要字符串有很多变化,StringBuffer将是一个开销较低的选择。
If you are creating a mutable class m, you should be prepared to write a lot more documentation about the treatment of references to m than if m were immutable.
如果您要创建一个可变类m,那么您应该准备编写比m是不可变的情况下多得多的文档说明,以说明怎样处理m的引用。
When considering a tree of nodes where each node is an immutable data structure, we must consider how to modify a node or nodes inside the tree without modifying the entire tree.
在考虑每个节点都是一个不可变数据结构的节点树时,我们必须考虑如何修改树内的一个节点或多个节点,而不必更改整个树。
It is fundamentally different, because the original Node is not being changed (since it cannot be, as it is immutable.)
但它有本质的不同,因为原始节点没有改变(它也不能改变,因为它是不可变的)。
Similarly, in NetKernel a resource request is resolved to an endpoint called an Accessor which is responsible for returning a concrete, immutable representation.
在NetKernel中与此类似,请求被解析为对某个Accessor端点的请求,该Accessor负责将具体不变的资源表示返回。
For example, the tuple type, while less flexible because it's immutable, is generally much faster than the list type when used in identical situations.
例如,tuple类型,尽管它是不可变的,灵活性较差,但在同一环境中使用时,它们通常比list类型快得多。
These are immutable laws of life, given to you by someone over 60 who has seen it all.
这些就是生活中的不变法则,来自一个年逾60岁的饱经一切的人。
Immutability (Temporal properties are immutable in the sense that changing the value results in a new value being added to the properties history).
不变性(Immutability)(时间属性在这样的意义下是不变的:改变值导致一个新的值被增加到属性历史中。)
Immutability (Temporal properties are immutable in the sense that changing the value results in a new value being added to the properties history).
不变性(Immutability)(时间属性在这样的意义下是不变的:改变值导致一个新的值被增加到属性历史中。)
应用推荐