Class ShapeRegistry

java.lang.Object
com.rvandoosselaer.blocks.ShapeRegistry

public class ShapeRegistry extends Object
A thread safe register for shapes. The register is used so only one instance of a shape is used throughout the Blocks framework.
  • Constructor Details

    • ShapeRegistry

      public ShapeRegistry()
      Will register default shapes
    • ShapeRegistry

      public ShapeRegistry(boolean registerDefaultShapes)
  • Method Details

    • register

      public Shape register(@NonNull @NonNull String name, Shape shape)
    • get

      public Shape get(String name)
    • remove

      public boolean remove(@NonNull @NonNull String name)
    • clear

      public void clear()
    • getAll

      public Collection<String> getAll()
    • registerDefaultShapes

      public void registerDefaultShapes()