Package dev.prozilla.pine.common
Interface Cloneable<O extends Cloneable<O>>
- Type Parameters:
O
- Type of the cloneable object
- All Known Implementing Classes:
Color
,Dimension
,Dimension.Add
,Dimension.Clamp
,Dimension.If
,Dimension.Max
,Dimension.Min
,Dimension.Multiply
,DimensionBase
,DimensionComparator
,DualDimension
,QuadDimension
,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
-