topics

全部话题 - 话题: immutable
首页 5 6 7 8 9 末页 (共10页)
h*o
发帖数: 1035
1
来自主题: TrustInJesus版 - 亚他那修信经浅析
from http://www.fuyinwang.com/wenji/mushi/2010-03-18/592.html
(注:福音网、基督时代等网站应该是是异端张大卫(张在亨)共同体(含耶青,耶稣
青年会)的网
站,其内容请注意甄别。本文超长,建议慢慢看)
《亚他那修信经》之简介
旧约是以色列民信仰和生活的唯一标准,而耶稣的教训和使徒的著作则奠定了教会
的根基。两者
都是神的默示,组成了基督教惟一的经典------。分旧新两约,所有的基督教会则以此
为根基而得以
建立起来的。教会蒙召的目的就是要保守、解明、传扬、应用、翻译、广播、推介并维
护神的话——一
言以蔽之,是使得中之神的思想在各处被高举并时时胜过人的思想。
教会在前进的过程中,会面对各样的异端。不拘此异端偏左或偏右,教会都应该坚
决、清楚地陈
明神在中的真理是什么。所以,教会在她小的或大的会议中所发表的,就是按照、遵守
神真理的训
练,对某一特殊观点所发表的教训,就叫作信条与信经(Creed)。这样一来,真理在
中有了根基,
而在信的人方面则有了可接纳的公认信条与信经(Creed)。公认信条就成了所有信徒
的义务,更是
他... 阅读全帖
C****i
发帖数: 1776
2
CHAPTER II
Of God, and of the Holy Trinity
I. There is but one only,[25] living, and true God,[26] who is infinite in b
eing and perfection,[27] a most pure spirit,[28] invisible,[29] without body
, parts,[30] or passions;[31] immutable,[32] immense,[33] eternal,[34] incom
prehensible,[35] almighty,[36] most wise,[37] most holy,[38] most free,[39]
most absolute;[40] working all things according to the counsel of his own im
mutable and most righteous will,[41] for his own glory;[42] most loving,[... 阅读全帖
C****i
发帖数: 1776
3
CHAPTER 3
OF GOD'S ETERNAL DECREE
1. God, from all eternity, did, by the most wise and holy counsel of his own
will, freely, and unchangeably ordain whatsoever comes to pass: yet so, as
thereby neither is God the author of sin, nor is violence offered to the wil
l of the creatures; nor is the liberty or contingency of second causes taken
away, but rather established.
2. Although God knows whatsoever may or can come to pass upon all supposed c
onditions, yet hath he not decreed anything because h... 阅读全帖
C****i
发帖数: 1776
4
CHAPTER 9
OF FREE WILL
1. God hath endued the will of man with that natural liberty, that it is nei
ther forced, nor, by any absolute necessity of nature, determined to good, o
r evil.
2. Man, in his state of innocency, had freedom, and power to will and to do
that which was good and well pleasing to God; but yet, mutably, so that he m
ight fall from it.
3. Man, by his fall into a state of sin, hath wholly lost all ability of wil
l to any spiritual good accompanying salvation: so as, a natural m... 阅读全帖
C****i
发帖数: 1776
5
CHAPTER IX
Of Free Will
I. God hath endued the will of man with that natural liberty, that it is nei
ther forced, nor, by any absolute necessity of nature, determined to good, o
r evil.[205]
II. Man, in his state of innocency, had freedom, and power to will and to do
that which was good and well pleasing to God;[206] but yet, mutably, so tha
t he might fall from it.[207]
III. Man, by his fall into a state of sin, hath wholly lost all ability of w
ill to any spiritual good accompanying salvation:... 阅读全帖
C****i
发帖数: 1776
6
CHAPTER XVII
Of the Perseverance of the Saints
I. They, whom God hath accepted in his Beloved, effectually called, and sanc
tified by his Spirit, can neither totally nor finally fall away from the sta
te of grace, but shall certainly persevere therein to the end, and be eterna
lly saved.[334]
II. This perseverance of the saints depends not upon their own free will, bu
t upon the immutability of the decree of election, flowing from the free and
unchangeable love of God the Father;[335] upon the e... 阅读全帖
R*o
发帖数: 3781
7
Defining Calvinism
In spite of many differences of opinion among Calvinists today, Calvinism is
generally explained by the acronym, TULIP. Philip F. Congdon writes that "a
tulip is a beautiful flower, but bad theology. The fruit of the flower is a
ppealing; the fruit of the theology is appalling . . . works, as an inevitab
le result, are necessary for salvation. To be fair, Classical Calvinists usu
ally object to this by describing the gospel message as not `faith + works =
justification,' but `... 阅读全帖
R*o
发帖数: 3781
8
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:18-32
1:28 Continuing on, Paul says that just as people did not see fit to acknowl
edge God, he gave them over to a depraved mind, to do things that are not fi
tting. The expression to see fit to acknowledge God is literally “they did
not approve to have God in [their] knowledge.” The word approve (ejdokivmas
an, edokimasan) means “to test,” “to examine,” “to come to a conclusion
based on evidence.” And the idea of knowledge (ejpignwvsi", epignosis) alw
ays means “moral or religious knowledge” in the ... 阅读全帖
R*o
发帖数: 3781
9
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:18-32
1:28 Continuing on, Paul says that just as people did not see fit to acknowl
edge God, he gave them over to a depraved mind, to do things that are not fi
tting. The expression to see fit to acknowledge God is literally “they did
not approve to have God in [their] knowledge.” The word approve (ejdokivmas
an, edokimasan) means “to test,” “to examine,” “to come to a conclusion
based on evidence.” And the idea of knowledge (ejpignwvsi", epignosis) alw
ays means “moral or religious knowledge” in the ... 阅读全帖
j*****7
发帖数: 10575
10
来自主题: TrustInJesus版 - 唐崇荣:神的预定与人的自由(1)
预定论
(资料取自唐崇荣牧师的《神的预定与人的自由》)
第一章 - 神的永存与受造的偶存
重复按钮找关键字
A。认识神的基础
B。人是被造、有限、受玷污
C。上帝是「有位格之真理的本体」
D。独行奇事的上帝
E。「永存的上帝」与「偶存的受造」
F。恶的产生
这个课程的题目 -- “神的预定与人的自由”,是许多人很难明白、很讨厌的题目
,但又没有办法不去思想,也不知道到哪里找答案,所以叫人气得半死。现在请你看看
主题看板上的字,有没有发现什麽特点?“神”和“人”的字体比较活泼,“的预定”
和“的自由”比较死板,对不对?还有什麽?“神”字在上、“人”字在下,对不对?
但是,最大的特点是什麽? -- “人”字比其他几个字都大! 把“人”字写得那麽大
,把“神”字写得比“人”字小一点,这就是我们不能明白这个题目的原因!
当你思想“神的预定与人的自由”时,如果你先把“人”放大,站在以自我为主体
的地位,用“我的理性”去了解他、用“我的思想”去衡量他、用“我的标准”去决定
他,你从人作为出发点,从人的主观性、人的角度去思想,就很难明... 阅读全帖
j*****7
发帖数: 10575
11
来自主题: TrustInJesus版 - 唐崇荣:神的预定与人的自由(3)
预定论
(资料取自唐崇荣牧师的《神的预定与人的自由》)
第三章 - 永恒的旨意与历史程序的动力
A。对预定论的两种反应。
B。神永恒的定旨和历史程序中间的动力。
C。上帝旨意的四个层面。
「神的预定与人的自由」这个题目是关系到「主权」与「主权」之间冲突的问题,
关系到「人归回神」的问题,以及「神的旨意」和「神意志中间所定的」是照他成全或
照你成全的问题;所以,许多人把神的道当作是生活中间可有可无的一些点缀,因为他
以人为中心。但如果你真正体会神的心意,明白他的筹算,知道他的计划的时候,你会
很感谢主 -- 我怎么会在上帝永恒的计划中间有分?我这个微不足道的小人、这个小小
的一分子,在神无限的大能中间,我竟然有分于他的救赎!如果全世界只剩下我,只有
一个我,耶稣远是会到世界上为我死。他爱我爱到这样这样的地步。感谢上帝!
对「预定论」的两种反应
我盼望在这个课程中间,许多人能感受到神竟然这样恩待我们,他把这样重大难测
的真理,用他自己的圣灵按着所启示的话语光照我们的心,使我们得以明白;你不但知
,且深知你所信的是谁,你就抱荣耀归给上帝。我也盼望你明白... 阅读全帖
R*o
发帖数: 3781
12
来自主题: TrustInJesus版 - Study and Exposition of Romans 3:9-20
Study By: Greg Herrick
A. Introduction
Many years ago there was a famous correspondence in The Times under the subj
ect “What is wrong with the world today?” The best letter of all was also
the shortest, and read—“Dear Sir, I am. Yours faithfully, G. K. Chesterton
.” That devastating declaration showed a profound insight into man’s unive
rsal malaise, and I believe that it can teach us a deeply challenging lesson
. I am convinced that throughout the Christian church there are problems, di
fficul... 阅读全帖
R*o
发帖数: 3781
13
来自主题: TrustInJesus版 - Study and Exposition of Romans 3:9-20
Study By: Greg Herrick
A. Introduction
Many years ago there was a famous correspondence in The Times under the subj
ect “What is wrong with the world today?” The best letter of all was also
the shortest, and read—“Dear Sir, I am. Yours faithfully, G. K. Chesterton
.” That devastating declaration showed a profound insight into man’s unive
rsal malaise, and I believe that it can teach us a deeply challenging lesson
. I am convinced that throughout the Christian church there are problems, di
fficul... 阅读全帖
C****i
发帖数: 1776
14
来自主题: TrustInJesus版 - 基要信仰概论 马有藻
第十二课
论时代
━━神的管家计划
一、序言
改革神学院名旧约教授W. Van Gemeren博士正确地指出:神在不同的世代逐步完成其救
恩大计,直至万物皆获得复兴之时,而每一时代总有神作为之特色,与其它时代有别〔
注1〕,但这只是单方面的行动,因在人方面,神向人亦有所要求,人故要向神的吩咐负
上责任,如此才能达成神的计划,所以历世历代属神的人皆可称为“神奥秘的管家”,
“所求于管家的,是要他有忠心”(林前4:1-2)。
过去与现在,不少人对“时代论”这神学课题仍有不少混淆不清,而致误解深种,进而
敌对、漫骂及摒弃,至为惋惜。本课试图解释“时代论”是一门正统的神学教义,对明
白整本圣经的神学信息、神对世人的要求与其管理世界的旨意,大有裨益。
二、“时代”的定义
“时代”一词表面看来似与时间有关,然而从圣经神学观点看,“时代”是一个“神的
管家法制”,兹从三方面探讨“时代”的定义。
A.英文的字义
“时代”(dispensation)乃从拉丁文“dispensatio”(意“分派”)演绎而来;由此
,“时代”这词可包含三个意义:1)分配工作的行动;2)管理工作的准则;3)要求尽职
的安排... 阅读全帖
G*******s
发帖数: 4956
15
来自主题: TrustInJesus版 - 神组(Godhead)
The Attributes of God As Evident in Each Person of the Godhead
The Father Jesus Christ The Holy Spirit
omnipotent
(all-powerful)
Genesis 18:14
Isaiah 43:13
Jeremiah 32:17, 27
Matthew 19:26
Daniel 7:13, 14
Matthew 28:18
1 Peter 3:22
John 3:31, 35; 17:2 Psalms 104:30
omnipresent
(everywhere)
1 Kings 8:27
Psalms 139:3, 7-10
Proverbs 15:3
Jeremiah 23:23, 24
Isaiah 57:15
Acts 17:24, 27, 28 Matthew 18:29
Matthew 28:19, 20
Ephesians 1:23 Psalms 139:7-10
omniscient
(all-knowing)
1 Chro... 阅读全帖
G*******s
发帖数: 4956
16
来自主题: TrustInJesus版 - 神组(Godhead)
The Attributes of God As Evident in Each Person of the Godhead
The Father Jesus Christ The Holy Spirit
omnipotent
(all-powerful)
Genesis 18:14
Isaiah 43:13
Jeremiah 32:17, 27
Matthew 19:26
Daniel 7:13, 14
Matthew 28:18
1 Peter 3:22
John 3:31, 35; 17:2 Psalms 104:30
omnipresent
(everywhere)
1 Kings 8:27
Psalms 139:3, 7-10
Proverbs 15:3
Jeremiah 23:23, 24
Isaiah 57:15
Acts 17:24, 27, 28 Matthew 18:29
Matthew 28:19, 20
Ephesians 1:23 Psalms 139:7-10
omniscient
(all-knowing)
1 Chro... 阅读全帖
G*******s
发帖数: 4956
17
来自主题: TrustInJesus版 - Godhead (Christianity)
The Attributes of God As Evident in Each Person of the Godhead
The Father Jesus Christ The Holy Spirit
omnipotent
(all-powerful)
Genesis 18:14
Isaiah 43:13
Jeremiah 32:17, 27
Matthew 19:26
Daniel 7:13, 14
Matthew 28:18
1 Peter 3:22
John 3:31, 35; 17:2 Psalms 104:30
omnipresent
(everywhere)
1 Kings 8:27
Psalms 139:3, 7-10
Proverbs 15:3
Jeremiah 23:23, 24
Isaiah 57:15
Acts 17:24, 27, 28 Matthew 18:29
Matthew 28:19, 20
Ephesians 1:23 Psalms 139:7-10
omniscient
(all-knowing)
1 Chro... 阅读全帖
j*****7
发帖数: 10575
18
第三章 神有一个计划
我 们无法想像一位有无限智慧与能力的神,在创造世界的时候却没有一个明确的计划
;如果神有计划,而神又是无限的,那么世界万物的一切细节一定都在他的计划之 中
。如果我们能从世界的过去、现在、未来看出它整体的关系,就会明白这个世界一直都
是精确地遵循一个预定的走向。不管是显微镜下的微小世界,还是望远镜外 的浩瀚宇
宙,我们都看到这一切受造物是有组织的,在整体中可以分成为许多小部份,每个小部
份又分成更小的部份,如此反覆无穷。
人 类虽然生命短暂,又容易犯错,作一件事都还会有一个计划,如果一个人作事漫无
目的,别人就会认为他愚昧。我们出门旅行、或作一件工作,都会先拟定目标,尽 力
而为。尽管有些人在理论上反对预定的教义,但是每个人在实际生活中都是预定论者。
司密斯(E. W. Smith)说:「一个聪明人是先拟定目标,然後再用最好的方法达成这
个目标。建筑师在动工之前,必须先画设计图,列出工作计划,甚至把施工细节都预先
规 划好了;在工人真正施工之前,这个建筑物应该在建筑师脑中已经先盖过一遍了。
商人、律师、农夫,和一切有理性、有悟性的人也是这样,都按预先规划的目标进 ... 阅读全帖
D*****r
发帖数: 6791
19
来自主题: TrustInJesus版 - 美國國父們都怎麼看基督教的?
Adam1813年夏天给Jefferson的信,挑起来吵架的
"Now I will avow, that I then believed, and now believe, that those general
Principles of Christianity,are as eternal and immutable, as the Existence
and Attributes of God; and that those Principles of Liberty,are as
unalterable as human Nature and our terrestrial, mundane System. I could
therefore safely say,
consistently with all my then and present Information, that I believed they
would never make Discoveries in contradiction to these general Principles.
In fav... 阅读全帖
n********n
发帖数: 8336
20
来自主题: TrustInJesus版 - 神学主体:有关神的教义
神的属性(Attributes of God)
定义
有关神属性的分类和界定,请参考「神的属性:分类范畴」一表,那只是一种主观
的界分。有些人用一些特殊的分类(属性以外的)来界定神的位格,他们列举各样特性
,如属灵的、人格的、无限量的及永恒的。不少神学家如伯可夫(Louis Berkhof)、
贺智(Charles Hodge)、石威廉(William Shedd)及巴域克(Herman Bavinck),都
根 据韦斯敏德信条(Westminster Confession)的分类;其他神学家如巴士威尔(J
Oliver Buswell,Jr.)及来利(Charles Ryrie)则没有将神的属性加以分类。
我们可对神的属性作以下的定义:「神的属性就是一些与神的概念不能分割,及神
本性中的各样特质。这些特性构成了神向其受造之物各种显现方式的基础和特质。》神
的属性必须与神的作为加以区分。神的属性不会为神「增加」什么;神的属性只表明了
神的本性(nature)。路易士(Gordon Lewis)以下的定义颇为全面。
神是一位眼不能见、有位格的及活的灵。神与任何其... 阅读全帖
l*****a
发帖数: 38403
21
来自主题: TrustInJesus版 - 称的是基督的名,信的是撒旦的道
耶和华:你们要生养众多
保罗:若他们常像我就好
大师听从哪一位? 你们这所谓一致性么,打脸的可就数不胜数了
John 1:18 "No man hath seen God at any time."
Exodus 33:20 "Thou canst not see my face: for there shall no man see me, and
live."
John 6:46 "Not that any man hath seen the Father, save he which is of God [
Jesus], he hath seen the Father."
I John 4:12 "No man hath seen God at any time."
vs.
Genesis 32:30 "For I have seen God face to face."
Exodus 33:11 "And the Lord spake unto Moses face to face, as a man speaketh
unto his friend."
Isaiah 6:1... 阅读全帖
n********n
发帖数: 8336
22
来自主题: TrustInJesus版 - 郁金香的困惑 -- 神的主权
第二章 神的主权 2012-12-03 14:10:28

几乎所有的正方介绍预定论的文章都会以强调神的主权开始。在他们看来反方不能接
受预定论主要是因为把人的自由意志抬得过高。强调人的自由意志就是贬低神的主权。
正方的思路是由于人全然败坏,不可能用败坏的自由意志选择归向神,只能抵挡神(这
个在后面《人的全然败坏》那一章中还会再讨论)。所以,必须由神来主动拣选一部分
人,使他们可以信。所以,必须强调神的主权,谁得救与否神说了算,跟人没多大关系
,完全是神的恩典。
一、 神的心意和神的计划
为了证明神预定了你我的一生,正方伯特纳同学说「神先有一个永恒的心意,然后根据
这永恒的心意预定一切未来的事」[1]。他说我们无法想象一位有无限智能与能力的神
,在创造世界的时候却没有一个明确的计划;如果神有计划,而神又是无限的,那么世
界万物的一切细节一定都在他的计划之中。[2]他引用了司密斯(E. W. Smith)的话来支
持自己:「一个聪明人是先拟定目标,然后再用最好的方法达成这个目标。建筑师在动
工之前,必须先画设计图,列出工作计划,甚至把施工细节都预先规划好了;在工人真
正施工之前... 阅读全帖
n********n
发帖数: 8336
23
来自主题: TrustInJesus版 - 上帝的属性(The Attributes of God)
上帝的属性(The Attributes of God)
(资料取自殷保罗著的《慕迪神学手册》)

定义
我们可对神的属性作以下的定义:「神的属性就是一些与神的概念不能分割,
及神本性中的各样特质。这些特性构成了神向其受造之物各种显现方式的基础和特质。
」神的属性必须与神的作为加以区分。神的属性不会为神「增加」什么;神的属性只表
明了神的本性(nature)。路易士(Gordon Lewis)以下的定义颇为全面:
神是一位眼不能见、有位格的及活的灵。神与任何其他灵体,在以下儿种属
性上是有所区别的:从形而上学说,神是自存(self-existent)、永恒和不变的;从智
慧上说,神是全知、信实及智慧的;从道德上说,神是公平的、有怜悯的有恩赐的;从
感情上说,神恨恶罪恶,容忍痛苦及富有怜悯;从存在上说,神是自由的、可靠的和全
能的;从关系上说,神的存在是超越的(transcendent),神对宇宙 性的照顾工作是内
蕴的(immanent),并且神对他子民的救赎工作也 是内蕴的。
神的属性,通常可以分为以下两个范畴。对分的称号法,就要看... 阅读全帖
J*******g
发帖数: 8775
24
来自主题: TrustInJesus版 - 信仰随笔:终极世界
有些意思。
佛教的我不懂,就不说了。
虽然每个人对神的认识都各有不同,最后总是要回到经文。我不知道你所谓的神需要满
足是哪些经文得出来的想法。
我记得基督教的神学中认为神有很多特性。其一是不变性(immutability),神也有自存
性(Aseity)。因为神不受时空限制,所以神是不变的。就是在创世之前的神,也是创
世之后的神,也是现在的神。神没有变化。既然神不变,在世界存在前,神不需要其他
东西就可以存在,所以现在的神也不需要其他东西。
圣经说神造人是为了显示神的荣耀。加上神的不变的特性,神的荣耀没有变化。世界和
人的存在只能是让神的荣耀显示出来。同时神还会分享自己的荣耀。而神虽然分享荣耀
,他的荣耀却不会减少。
S**U
发帖数: 7025
25
来自主题: Wisdom版 - Ajahn Mahã Boowa 的如来藏见解
这是个很好的例子,显示没有无我正见的禅修,是怎么修出如来藏的。
Jotika 禅师对证果的描述,可以用来与此文对比。看看什么样的证果是符合阿含的。
Appendix II
Citta – The Mind’s Essential Knowing Nature.
The following comments about the nature of the citta have been excerpted
from several discourses given by Ãcariya Mahã Boowa.
Of foremost importance is the citta, the mind’s essential knowing nature.
It consists of pure and simple awareness: the citta simply knows. Awareness
of good and evil, and the critical judgements that result, are merely
activities of... 阅读全帖
w***z
发帖数: 1848
26
来自主题: CS版 - 贴一道take home的面试题
某小公司,面试前居然还要先做一个 take home的assignment。贴出来让大家看看。俺
是EE,对这种编程不太熟悉,哪位大牛指点指点?
Develop a new type in C++ for an immutable sequence of 32-bit random
integers. Each integer should be selected at random from the range 0 to 4,
294,967,295 inclusive.
Your class should have two constructors. The first constructor will
take a parameter that indicates the number of random numbers desired.
The second will be a copy constructor.
Your class should have two member functions: one function to iterate
forward throug
L*******r
发帖数: 1011
27
hehe, just the immutable and mutable issue. Very common issue.
When I was teaching Java for cs undergraduate, they always asked those kind of
"string" questions. :)
Anyway, you have stringbuffer in Java.
I talked about stringbuilder, whcih is "stringbuffer" equivalent in C#, in my
recent post. :)

that
the
d***m
发帖数: 11
28
String is immutable reference type, meaning that new string object will
always be created. even though the assignment may make you think it trys to
modify the content of string.
So if you do:
sring a= "cat";
sring b=a;
a="dog";
a new "dog" object is created and assigned to a, and b is still pointing to
"cat".

m
d***m
发帖数: 11
29
String is immutable reference type, meaning that new string object will
always be created. even though the assignment may make you think it trys to
modify the content of string.
So if you do:
sring a= "cat";
sring b=a;
a="dog";
a new "dog" object is created and assigned to a, and b is still pointing to
"cat".
And pass by reference actually does a copy of the reference, similar to what
the following line does:(in c# there is no such concept of pointer to
pointer)
sring b=a;

m
W********n
发帖数: 254
30
string就是一大坑,it's immutable
y****n
发帖数: 5
31
来自主题: Java版 - 一个Java程序员的话(3)
看了老大们的Re信,我也比较有劲了.先谢了.有老大问起string
class来,小的不敢不答.
反正我也没有整体结构的想法,呵呵!
第二章 Java中的Idioms
要说起来Java也很有意思,它给软件开发中从头到尾都套上了大大小
小的框框—pattern.
从architecture到programming. 这的确又是JAVA重用思想在设计上
的体现.这一章主要想谈谈programming中的pattern—idioms.
首先就想说说JAVA中最特殊,最常用的String Class.
它就是Immutable value pattern在JDK中的一个典型例子.在程序开
发中,我们常常会遇到这样一些data
object,我们关心的是它的content 而不是它的identity.
拿一个string object来说,我们只关心它里面有什么character,而不
管它是object A或是B. 对于这样一些object如果它的state是可变的
,那么我们在编程是就会有各种各样的麻烦.先是你必须保证thread
safe,这样你需要同步化. 再有你必须时时刻刻提防
r****n
发帖数: 1088
32
来自主题: Java版 - BufferedWriter里的write()
String is not primitive type. String extends from Object. String is immutable,
which makes String "special".
g*****g
发帖数: 34805
33
来自主题: Java版 - immutable list
You can have your list as a field in another class,
say ImmutableList, and in this class you only expose
method that you want to expose. e.g. only the get(int i)
class ImmutableList {
private List data;
public Object get(int i) {
return data.get(i);
}
}
p***p
发帖数: 559
34
来自主题: Java版 - immutable list
Well, I have to reture a List
object, so any suggestion?
g*****g
发帖数: 34805
35
来自主题: Java版 - immutable list
这个建议不加,因为是要只读的,一旦实现List,那些add/remove方法都要实现,
固然可以实现为空方法或抛异常,但都不如编译时就告诉你这个方法没有。
不过可以先定义一个ImmutableListInterface。
p***p
发帖数: 559
36
来自主题: Java版 - immutable list
是不是还加个implements?
还是extends ArrayList,然后再overload
class ImmutableList implements List{
private List data;
public Object get(int i) {
return data.get(i);
}
}
m******y
发帖数: 102
37
来自主题: Java版 - immutable list
Collections.unmodifiableList(List list)
r*****l
发帖数: 2859
38
来自主题: Java版 - immutable list
嘿嘿,这是用java的人给出的答案。前面的几个回答不错,但是因为java已经实现了,
就用不着费力气了。
m******t
发帖数: 2416
39
Short answer: you can't.
Long answer: java parameters are passed by value. when you call change(dObj)
, the reference to dObj is passed by value. So when you assign a different
reference to it from within change(), it gets lost when the method returns.
On top of that, Double is an immutable type, so you can't change its value.
You can return a new Double object from change(), or you can (warning: bad
practice):
change(Double[] pseudoPointer) {
pseudoPointer[0] = 0.3;
}
g*****g
发帖数: 34805
40
You are wrong, Double is designed to be an immutable class for
efficiency. If you want a mutable Double class, create a MutableDouble class
should be trivial.
Java is not powerful enough for writing an OS. But enough for
most application programming.

looks
b*******p
发帖数: 44
41
来自主题: Java版 - TIJ上写错了?
There is a buffer? Don't think so. If Java can keep track of all String
objects with the same content, then why not do the same thing as those
initialized by string literals since String objects are immutable. And wots
the buffer for here?
g****y
发帖数: 436
42
来自主题: Java版 - 请问有没有generic的array
thanks. actually i agree what you said, however, in my project, we have to d
eal with various heterogenious data, which requires a relatively immutable f
ramework, so that we wont need to modify our code whenever we get new data.
a****i
发帖数: 1182
43
try
public class Storage {
String[] ok;
public set(int index, String value) {
ok[index] = value;
}
}
class Main {
public static void main (String[] args) {
Storeage m = new Storeage();
String mystring = "ok";
m.set(10, mystring);
}
}
there is no way to get the reference and assign it.
String objects are immutable.
s*******e
发帖数: 174
44
来自主题: Java版 - 一道 JAVA Stack vs Heap 题
It says "Because String objects are immutable, they can be shared."
h*****0
发帖数: 4889
45
来自主题: Java版 - 一道 JAVA Stack vs Heap 题
string is immutable...

new
m******t
发帖数: 2416
46
来自主题: Java版 - HashMap cache

If it's for caching and you are not worried about updating, then
the objects cached can be considered immutable, then two objects
loaded by the same key would be logically equivalent and would stay
that way.
If that's the case, why not just skip synchronization all together.
Worse comes to worst two threads get two equivalent objects, right?
c*****t
发帖数: 1879
47
来自主题: Java版 - java 响应速度问题
It is very possible that you got cyclic triggering of events that caused
long delays and locking etc.
For example, when you call setText for instance, it will try to repaint,
and painting itself will trigger your action. Those all take a while.
There are many things you could try to optimize
1. obviously find a way to update the data w/o triggering redisplay
until ready for update.
2. Use immutable objects that eliminate the need for synchronization.
c*****t
发帖数: 1879
48
来自主题: Java版 - modify parameter, or return?
Depends on if listA has to be immutable.
q*********u
发帖数: 280
49
来自主题: Java版 - a fun coding question
Integers are immutable. If you want to affect the value of a Integer
variable, the only way is to create a new Integer object and discard the old
one.
在你这个
a = 1
a.notifyAll();
这里新的Integer的对象出来了,已经不是原来那个a所指的对象,这个时候在notify,
就会出现illegalMonitorStateException
这个题的确是比较阴险的。
g**e
发帖数: 6127
50
来自主题: Java版 - 一个多线程问题
我答没有。string is immutable
首页 5 6 7 8 9 末页 (共10页)