In class-based object-oriented programming languages, a leaf class is a class that should not be subclassed. This can be enforced either by convention, or by using a language feature such as the reserved words (keywords) final
in C++, Dart, Java, and PHP,[1] or sealed
in C# and Scala.
In Java, the Leaf node is an abstract class for all scene graph nodes that have no children. Leaf nodes specify lights, geometry, and sounds. They specify special linking and instancing abilities for sharing scene graphs and provide a view platform for positioning and orienting a view in the virtual world.[2]
References
- ↑ "PHP: Final Keyword - Manual". www.php.net. Retrieved 17 May 2023.
- ↑ "Class Leaf". Docs.Oracle. 2 April 2001. Retrieved 23 May 2022.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.