J
J
Jake Taylor2021-05-24 23:21:11
css
Jake Taylor, 2021-05-24 23:21:11

What does the term "primitive object" mean?

While reading the gang of four book on design patterns, I came across such a concept as a "primitive object" in the following context (p. 163):
60ac0a5614e99365659084.jpeg

PS I mean that this concept means the following: a primitive object is an object that has no children (is a leaf in tree structure).

What does this concept mean? When answering, I want to see the definition of this phrase using a link to the book in which this definition is given, because without a source, it is impossible to operate with this concept in the future.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
shmatuan, 2018-12-28
@shmatuan

https://engageinteractive.co.uk/blog/5-modern-snow...
https://codepen.io/massiebn/pen/vmkwJ

M
Maxim Timofeev, 2018-12-28
@webinar

moving snowflakes on the background of the site

and
These are two different tasks. Making an animated picture to start snowing in the background is like buying an apartment to go to the toilet. Well, you can, of course, but no one will call you smart.
Snowflakes are made using js and there are probably 2 million ready-made solutions already: https://www.google.com/search?q=js+%D0%BF%D0%B0%D0...
But usually such things interfere with the user and appear in the head of people who play web dev, and do not take it seriously. These are schoolchildren, grandmothers, owners of large holdings and other people who do not understand anything about ux / ui. So be careful with that. For a site about minecraft made on ucoz, this is appropriate, but what's there, it's a must-have. But for many projects, this is a headshot for a marketer. This does not mean that you should not style your site for the holidays. Pay attention to how the greats of this world do it (google, yasha, toaster, etc.)

O
Orkhan Hasanli, 2021-05-25
@n199a

Good afternoon!
There is no concept of a primitive object in java. There is a primitive data type and there is also a reference data type. The GoF book is generalized about OOP patterns, not specifically about Java patterns.
However, in Java, according to JEP, this is considered.
I think this link will be useful for you:
https://openjdk.java.net/jeps/401


Primitive objects and classes That is, a primitive object does not have a fixed memory address or any other property to distinguish it from other instances of the same class whose fields store the same values. Primitive objects cannot mutate their fields or be used for synchronization. The == operator on primitive objects compares their fields. Concrete classes whose instances are primitive objects are called primitive classes.

V
Vasily Bannikov, 2021-05-25
@vabka

In this case, the "primitive object" is the "primitive graphics object" referred to above.
And they are primitive, as opposed to a complex Picture, which can contain many primitive objects.
No hidden meaning, no definitions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question