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

    Modifier and Type
    Method
    Description
    Returns a new object that is equal to this object.
    static <C extends Cloneable<C>>
    C
    clone(C cloneable)
    Clones the cloneable, if it is not null.
    boolean
    equals(O other)
    Checks if the given object is equal to this object.
  • Method Details

    • equals

      boolean equals(O other)
      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

      static <C extends Cloneable<C>> C clone(C cloneable)
      Clones the cloneable, if it is not null.
      Type Parameters:
      C - The type of cloneable
      Parameters:
      cloneable - The cloneable, or null
      Returns:
      The clone, or null