Package dev.prozilla.pine.common
Interface Cloneable<O extends Cloneable<O>>
- Type Parameters:
O- Type of the cloneable object
- All Known Implementing Classes:
AssetPoolEvent,AudioSource,Circle,Color,Colour,ConfigOptionEvent,CubicBezierEasing,Dimension,Dimension.Add,Dimension.Clamp,Dimension.If,Dimension.Max,Dimension.Min,Dimension.Mix,Dimension.Multiply,Dimension.Subtract,DimensionBase,DimensionComparator,Directory,DualDimension,Event,FixedColorProperty,FixedObjectProperty,FixedStringProperty,Image,NodeEvent,QuadDimension,Rect,RoundedRect,Shape,StepEasing,Texture,TextureArray,TextureArrayLayer,Vector,Vector2f,Vector2i,Vector3f,Vector3i,Vector4f,Vector4i,VectorFloat,VectorInt
public interface Cloneable<O extends Cloneable<O>>
Abstract interface for cloneable objects.
A cloneable object should have a
clone() method that returns a new instance
and an equals(object) method that returns true when used with the clone.-
Method Summary
-
Method Details
-
equals
Checks if the given object is equal to this object.- Parameters:
other- Other object- Returns:
trueif both objects are equal.
-
clone
Returns a new object that is equal to this object.- Returns:
- Clone of this object
-
cloneOf
Clones the cloneable, if it is notnull.- Type Parameters:
C- The type of cloneable- Parameters:
cloneable- The cloneable, ornull- Returns:
- The clone, or
null
-