Class ImgFactory<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T type  
    • Constructor Summary

      Constructors 
      Constructor Description
      ImgFactory()
      Deprecated.
      ImgFactory​(T type)  
    • Field Detail

      • type

        private T type
    • Constructor Detail

      • ImgFactory

        public ImgFactory​(T type)
      • ImgFactory

        @Deprecated
        public ImgFactory()
        Deprecated.
    • Method Detail

      • type

        public T type()
      • create

        public abstract Img<T> create​(long... dimensions)
        Create an Img<T> with the specified dimensions.
        Returns:
        new image with the specified dimensions.
      • create

        public Img<T> create​(Dimensions dimensions)
        Create an Img<T> with the specified dimensions.
        Returns:
        new image with the specified dimensions.
      • create

        public Img<T> create​(int[] dimensions)
        Create an Img<T> with the specified dimensions.

        Note: This is not a vararg function because the underlying int[] based methods already copies the int[] dimensions into a disposable long[] anyways. This would be an unnecessary copy for int... varargs.

        Returns:
        new image with the specified dimensions.
      • create

        @Deprecated
        public abstract Img<T> create​(long[] dim,
                                      T type)
        Deprecated.
      • create

        @Deprecated
        public Img<T> create​(Dimensions dim,
                             T type)
        Deprecated.
      • create

        @Deprecated
        public Img<T> create​(int[] dim,
                             T type)
        Deprecated.
      • create

        @Deprecated
        public Img<T> create​(java.util.function.Supplier<T> typeSupplier,
                             long... dim)
        Deprecated.
      • create

        @Deprecated
        public Img<T> create​(java.util.function.Supplier<T> typeSupplier,
                             Dimensions dim)
        Deprecated.
      • create

        @Deprecated
        public Img<T> create​(java.util.function.Supplier<T> typeSupplier,
                             int[] dim)
        Deprecated.
      • cache

        @Deprecated
        protected void cache​(T type)
        Deprecated.
        If the cached type instance was previously null, the given type becomes the cached instance. In this way, if the factory was created using one of the deprecated typeless constructor signatures, but then one of the deprecated create methods is called (i.e.: a method which provides a type instance as an argument), the provided type becomes the cached type instance so that subsequent invocations of the typeless create methods will work as desired.
        Parameters:
        type - The type to cache if needed.