Package org.eolang

Class AtFormed

  • All Implemented Interfaces:
    Attr, Term

    public final class AtFormed
    extends Object
    implements Attr
    Attribute that constructs object lazily.

    The main difference between this attribute and AtComposite is it does not depend on context. It means that every new copy of the attribute is linked to the origin one (which was initialized first).

    Since:
    0.36.0
    • Constructor Detail

      • AtFormed

        public AtFormed​(Supplier<Phi> func)
        Ctor.
        Parameters:
        func - Callback to retrieve object.
    • Method Detail

      • copy

        public Attr copy​(Phi self)
        Description copied from interface: Attr
        Make a copy of it.
        Specified by:
        copy in interface Attr
        Parameters:
        self - The object that this attribute will belong to
        Returns:
        A copy
      • get

        public Phi get()
        Description copied from interface: Attr
        Take the object out.
        Specified by:
        get in interface Attr
        Returns:
        The object
      • put

        public boolean put​(Phi phi)
        Description copied from interface: Attr
        Put a new object in.
        Specified by:
        put in interface Attr
        Parameters:
        phi - The object to put
        Returns:
        Was attribute set
      • φTerm

        public String φTerm()
        Description copied from interface: Term
        To φ-calculus term, as text.
        Specified by:
        φTerm in interface Term
        Returns:
        The expression in φ-calculus