The classes, interfaces and methods in the LuciadLightspeed API use the following naming conventions:
Package names |
|
Interface names |
|
Abstract class names |
|
Concrete class names |
|
Enumeration names |
|
Lucy specific classes |
|
Lightspeed view related classes |
|
Side-effect method arguments |
Method name ends with |
What are side-effect method arguments ?
Normally a method takes some arguments as input, and returns a result.
When the method takes a side-effect argument, the method does not return a new object, but modifies the argument instead. This is typically done for performance reasons because the existing object can be re-used, and the creation of a new object can be avoided.
This example is a method that returns a new instance without changing the argument.
public Point transform( Point aPoint ) {
int x = … ;// transform x-coordinate
int y = … ;// transform y-coordinate
return new Point( x, y );// Returns a NEW point
}
whereas the side-effect version could look like this:
public void transformSFCT(Point aPoint, Point aResultSFCT ) {
aResultSFCT.setX( … );// transform x-coordinate
aResultSFCT.setY( … );// transform y-coordinate
}