Difference between revisions of "Cloning objects"
Jump to navigation
Jump to search
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Book]] |
||
− | |||
*** TO DO *** |
*** TO DO *** |
||
+ | add this page, maybe there is already some useful content in the french version of the SmartEiffel Wiki. |
||
− | Please wait for the French version to be stable enough before to start translation... |
||
+ | |||
+ | * rename this page to "duplicating objects"? |
||
+ | * twin, copy |
||
+ | * main property: is_equal afterwards |
||
+ | * make, COLLECTION.from_collection (e. g. make an ARRAY from another type of collection) |
||
+ | |||
+ | <ramack> copy is a feature which is inherited from ANY - so EVERY class (and therefore every object) has it and it does the same everywhere: the object on which it is called (the thing before the dot) copies the content of the parameter of the call |
||
+ | <ramack> in case of an ARRAY2 this of course also applies to lower/upper12... |
||
+ | <ramack> the main property of copy is that: a.copy(b).is_equal(b) holds |
||
+ | <Petroo> makes sense |
||
+ | <ramack> I. e. after copying from an object it is equal! |
Latest revision as of 19:56, 16 April 2016
*** TO DO *** add this page, maybe there is already some useful content in the french version of the SmartEiffel Wiki.
* rename this page to "duplicating objects"? * twin, copy * main property: is_equal afterwards * make, COLLECTION.from_collection (e. g. make an ARRAY from another type of collection)
<ramack> copy is a feature which is inherited from ANY - so EVERY class (and therefore every object) has it and it does the same everywhere: the object on which it is called (the thing before the dot) copies the content of the parameter of the call <ramack> in case of an ARRAY2 this of course also applies to lower/upper12... <ramack> the main property of copy is that: a.copy(b).is_equal(b) holds <Petroo> makes sense <ramack> I. e. after copying from an object it is equal!