Class AbstractDeclaredEffectiveStatement<A,​D extends DeclaredStatement<A>>

    • Constructor Detail

      • AbstractDeclaredEffectiveStatement

        public AbstractDeclaredEffectiveStatement()
    • Method Detail

      • getStatementSource

        public final StatementSource getStatementSource()
        Description copied from interface: ModelStatement
        Returns statement source, which denotes if statement was explicitly declared in original model or inferred during semantic processing of model.
        Returns:
        statement source.
      • getDeclared

        public abstract @NonNull D getDeclared()
        Description copied from interface: EffectiveStatement
        Returns statement, which was explicit declaration of this effective statement.
        Returns:
        statement, which was explicit declaration of this effective statement or null if statement was inferred from context.
      • 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<? extends T> unmaskSet​(@NonNull Object masked,
                                                                                @NonNull Class<T> type)