GnuSmalltalkUsersGuide:BaseChapter 102

From 흡혈양파의 번역工房
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
LookupKey

LookupKey

네임스페이스 Smalltalk에 정의됨

슈퍼클래스: Magnitude

범주: 언어-데이터 타입


나는 데이터 구조에서 엔트리를 검색하기 위한 키를 표현한다. Association과 같은 나의 서브클래스들은 보통 dictionary 엔트리를 나타낸다.


LookupKey 클래스: 기본

key: aKey

주어진 키와 값으로 된 수신자의 새 인스턴스를 응답하라.


LookupKey: 접근하기

key

수신자의 키를 응답하라.

key: aKey

수신자의 키를 aKey로 설정하라.


LookupKey: 인쇄하기

printOn: aStream

수신자의 표현을 aStream 상에 놓아라.


LookupKey: 보관하기

storeOn: aStream

수신자로 컴파일하는 일부 스몰토크 코드를 aStream에 놓아라.


LookupKey: 검사하기

< aLookupKey

수신자의 키가 aLookupKey의 키보다 작은지를 응답하라.

= aLookupKey

수신자의 키와 값이 aLookupKey의 것과 같은지를 응답하고, aLookupKey가 수신자의 인스턴스가 아닌 경우 실패한다.

hash

수신자에 대한 해시값을 응답하라.


Notes