immutability
What role does string immutability play in the explaination of string references to developers?
In one form or another I encounter the following question often (posed, here, in pseudo-code): String myString = \"Hello\"[详细]
2023-03-16 19:16 分类:问答Can Such An Object Be Considered Immutable?
I have designed a class containing some information about a given object which will be registered in an SQL Server database. I would like to make this object (deeply) immutable, but I also must assure[详细]
2023-03-15 03:29 分类:问答How to make an 2D ArrayList immutable?
In the project I am working on, I have a 2D ArrayList which represents some data开发者_开发百科:[详细]
2023-03-14 20:51 分类:问答Can I make object unmutable once the constructor is called?
class X { String x1; String x2; //... String x15; public X (Other o) { // initialize x1,x2,...,x15 } String getx1 () { return x1; }// lot of getters[详细]
2023-03-14 17:24 分类:问答Statically decide if a Scala class is immutable
I just attended a Scala-lecture at a summer school. The lecturer got the following question: - \"Is there any way for the compiler to tell if a class is immutable?\"[详细]
2023-03-14 14:54 分类:问答Scala: why remove is deprecated in favor of filterNot?
scala> List(1, 2, 3) remove (_ < 2) <console>:8: warning: method remove in class List is deprecated: use `filterNot\'开发者_开发知识库[详细]
2023-03-14 13:59 分类:问答D language cast operator overload problem
I\'m playing with D2 at the moment, I would like to write some simple program but i\'m stuck with operator cast overload...I have a Vector class 开发者_运维问答that can be cast to Normal :[详细]
2023-03-14 09:51 分类:问答A read only (immutable) serializeable class
I\'ve designed a class that has with two properties - as string type and a list of objects.I\'m loading some xml and deserializing it into an instance of the class, which works very well.What I want i[详细]
2023-03-12 19:22 分类:问答Why doesn't string.Substring share memory with the source string?
As we all know, strings in .NET are immutable. (Well, not 100% totally immutable开发者_JAVA技巧, but immutable by design and used as such by any reasonable person, anyway.)[详细]
2023-03-10 23:41 分类:问答final roadblock with builder
I have a graph (g) that uses a builder ( J Bloch style ).The graph needs to be reversed to run certain statistics that are then cached for reports and analysis algorithms to access.[详细]
2023-03-10 16:35 分类:问答