Class ReadOnlyObjects.GHMetaGettersUnmodifiable

  • All Implemented Interfaces:
    ReadOnlyObjects.GHMetaExample
    Enclosing class:
    ReadOnlyObjects

    public static class ReadOnlyObjects.GHMetaGettersUnmodifiable
    extends Object
    implements ReadOnlyObjects.GHMetaExample
    This version uses only public getters and returns unmodifiable lists.

    Pro:

    • Very Easy to create
    • Minimal code
    • Minimal annotations
    • Fields effectively final and lists unmodifiable
    Con:
    • Effectively final is not quite really final
    • If one of the lists were missing (an option member, for example), it will throw NPE but we could mitigate by checking for null or assigning a default.
    Author:
    Liam Newman
    See Also:
    GHMeta