ValueLink.st
author Claus Gittinger <cg@exept.de>
Sat, 02 May 2020 21:40:13 +0200
changeset 5476 7355a4b11cb6
parent 4666 fbe9af9a6158
permissions -rw-r--r--
#FEATURE by cg class: Socket class added: #newTCPclientToHost:port:domain:domainOrder:withTimeout: changed: #newTCPclientToHost:port:domain:withTimeout:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3919
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
     1
"{ Encoding: utf8 }"
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
     2
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     3
"
4
1f66800df351 *** empty log message ***
claus
parents: 3
diff changeset
     4
 COPYRIGHT (c) 1992 by Claus Gittinger
84
claus
parents: 36
diff changeset
     5
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    13
"
3919
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    14
"{ Package: 'stx:libbasic2' }"
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    15
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    16
"{ NameSpace: Smalltalk }"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    17
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    18
Link subclass:#ValueLink
254
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    19
	instanceVariableNames:'value'
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    20
	classVariableNames:''
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    21
	poolDictionaries:''
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    22
	category:'Collections-Support'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    23
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    24
31
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    25
!ValueLink class methodsFor:'documentation'!
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    26
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    27
copyright
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    28
"
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    29
 COPYRIGHT (c) 1992 by Claus Gittinger
84
claus
parents: 36
diff changeset
    30
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    31
31
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    32
 This software is furnished under a license and may be used
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    33
 only in accordance with the terms of that license and with the
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    35
 be provided or otherwise made available to, or used by, any
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    36
 other person.  No title to or ownership of the software is
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    37
 hereby transferred.
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    38
"
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    39
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    40
31
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    41
documentation
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    42
"
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    43
    this class provides Links which can hold a value.
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    44
    Instances are typically used as elements in a linkedList.
254
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    45
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    46
    [see also:]
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    47
        LinkedList
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    48
        Collection OrderedCollection
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    49
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    50
    [author:]
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    51
        Claus Gittinger
31
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    52
"
e223f3cf2995 *** empty log message ***
claus
parents: 4
diff changeset
    53
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    54
291
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    55
!ValueLink class methodsFor:'instance creation'!
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    56
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    57
value: aValue
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    58
    "return a new instance with a value of aValue."
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    59
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    60
    ^self basicNew value:aValue
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    61
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    62
    "Created: 9.5.1996 / 16:12:19 / cg"
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    63
! !
395079f968b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    64
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    65
!ValueLink methodsFor:'accessing'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    66
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    67
value
4666
fbe9af9a6158 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
    68
    "return the link's contents"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    69
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    70
    ^ value
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    71
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    72
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    73
value:anObject
4666
fbe9af9a6158 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
    74
    "set the link's contents"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    75
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    76
    value := anObject
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    77
! !
124
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
    78
3919
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    79
!ValueLink methodsFor:'printing'!
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    80
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    81
printOn:aStream
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    82
    aStream show:'%1(%2)' with:(self class name) with:self value.
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    83
! !
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    84
131
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
    85
!ValueLink class methodsFor:'documentation'!
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
    86
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
    87
version
3919
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    88
    ^ '$Header$'
131
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
    89
! !
3919
57fbcf872e8d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 291
diff changeset
    90