Class AbstractDeclaredStatement<A>

    • Constructor Detail

      • AbstractDeclaredStatement

        public AbstractDeclaredStatement()
    • Method Detail

      • declaredSubstatements

        public Collection<? extends DeclaredStatement<?>> declaredSubstatements()
        Description copied from interface: DeclaredStatement
        Returns collection of explicitly declared child statements, while preserving its original ordering from original source.
        Specified by:
        declaredSubstatements in interface DeclaredStatement<A>
        Returns:
        Collection of statements, which were explicitly declared in source of model.
      • maskList

        protected static final @NonNull Object maskList​(ImmutableList<?> list)
        Utility method for squashing singleton lists into single objects. This is a CPU/mem trade-off, which we are usually willing to make: for the cost of an instanceof check we can save one object and re-create it when needed. The inverse operation is #unmaskSubstatements(Object)}.
        Parameters:
        list - list to mask
        Returns:
        Masked list
        Throws:
        NullPointerException - if list is null
      • unmaskSet

        protected static final <T> @NonNull ImmutableSet<T> unmaskSet​(@NonNull Object masked,
                                                                      @NonNull Class<T> type)