Package dev.prozilla.pine.common
Interface Cloneable<O extends Cloneable<O>>
- Type Parameters:
O
- Type of the cloneable object
- All Known Implementing Classes:
AssetPoolEvent
,Color
,Colour
,ConfigOptionEvent
,Dimension
,Dimension.Add
,Dimension.Clamp
,Dimension.If
,Dimension.Max
,Dimension.Min
,Dimension.Mix
,Dimension.Multiply
,Dimension.Subtract
,DimensionBase
,DimensionComparator
,DualDimension
,Event
,Image
,NodeEvent
,QuadDimension
,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:
true
if both objects are equal.
-
clone
O clone()Returns a new object that is equal to this object.- Returns:
- Clone of this object
-
clone
Clones the cloneable, if it is notnull
.- Type Parameters:
C
- The type of cloneable- Parameters:
cloneable
- The cloneable, ornull
- Returns:
- The clone, or
null
-