Class NullableContainer<T>


  • public class NullableContainer<T>
    extends java.lang.Object
    A simple container that can hold a value. This is class is used to make the autoporting of primitive types easier. For example autoporting enums will convert them to non nullable types. But if you embed them in a NullableContainer, the autoporting will convert them to nullable types.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T value  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Gets the value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        private final T value
    • Constructor Detail

      • NullableContainer

        public NullableContainer​(T value)
        Creates a new NullableContainer instance.
        Parameters:
        value - the value
    • Method Detail

      • getValue

        public T getValue()
        Gets the value.
        Returns:
        the value