Class Field<E>

    • Method Detail

      • toFinal

        public abstract Field<E> toFinal()
        Returns a new Field, that differs from this Field by being final. If this Field is already final, the the result is equal to this Field.
        See Also:
        isFinal()
      • optional

        public abstract Field<E> optional()
        Returns a new Field, that differs from this Field by being optional. If this Field is already optional, the the result is equal to this Field.
        See Also:
        isMandatory()
      • isFinal

        public final boolean isFinal()
        Description copied from interface: Settable
        Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.
        Specified by:
        isFinal in interface Settable<E>
        See Also:
        toFinal()
      • isMandatory

        public final boolean isMandatory()
        Specified by:
        isMandatory in interface Settable<E>
      • isInitial

        public boolean isInitial()
        Returns true, if a value for the field should be specified on the creation of an item. This default implementation returns {@link #isFinal()} || {@link #isMandatory()}.
        Specified by:
        isInitial in interface Settable<E>
      • getInitialExceptions

        public Set<Class<? extends Throwable>> getInitialExceptions()
        Description copied from interface: Settable
        Returns the exceptions possibly thrown, when setting a value for this settable.
        Specified by:
        getInitialExceptions in interface Settable<E>
      • getValueClass

        public final Class<E> getValueClass()
      • mapNull

        public final SetValue<E> mapNull()
      • get

        public abstract E get​(Item item)
      • set

        public abstract void set​(Item item,
                                 E value)