Interface Buildable.Overlayable<T>

Type Parameters:
T - the derived type
All Superinterfaces:
Buildable
All Known Implementing Classes:
PostalInfo
Enclosing interface:
Buildable

public static interface Buildable.Overlayable<T> extends Buildable
Interface for objects that can produce an "overlay", which means a copy where non-null fields from another object are copied over, but null fields on the source are not.

Warning: Do not use emptyToNull methods in the getters of an Buildable.Overlayable! We use null to mean "skip this field" whereas empty means "set this field to empty", so they are semantically different.

  • Method Details

    • overlay

      T overlay(T source)
      Return an overlay of this object using non-null fields from the source.