Package org.eolang

Class PhDefault

    • Field Detail

      • VTX

        protected static final ThreadLocal<org.eolang.Vertices> VTX
        Vertices.
      • vertex

        protected int vertex
        Identity of it (the ID of the vertex).
    • Constructor Detail

      • PhDefault

        public PhDefault()
        Ctor.
      • PhDefault

        public PhDefault​(Phi sigma)
        Ctor.
        Parameters:
        sigma - Sigma
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • φ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
      • copy

        public final Phi copy()
        Description copied from interface: Phi
        Make a copy, leaving it at the same parent.
        Specified by:
        copy in interface Phi
        Returns:
        A copy
      • attr

        public final Attr attr​(int pos)
        Description copied from interface: Phi
        Get attribute by position.
        Specified by:
        attr in interface Phi
        Parameters:
        pos - The position of the attribute
        Returns:
        The attr
      • attr

        public final Attr attr​(String name)
        Description copied from interface: Phi
        Get attribute.
        Specified by:
        attr in interface Phi
        Parameters:
        name - The name of the attribute
        Returns:
        The attr
      • locator

        public String locator()
        Description copied from interface: Phi
        Get code locator of the phi.
        Specified by:
        locator in interface Phi
        Returns:
        String containing code locator
      • cleanUp

        public static void cleanUp()
        Clean up resources. This includes call of ThreadLocal.remove() method to prevent memory leaks.
      • add

        protected final void add​(String name,
                                 Attr attr)
        Add new attribute. This method can only be called from child classes, in their constructors, when they declare their attributes. This is why it's protected. Not the brightest design, I admit.
        Parameters:
        name - The name
        attr - The attr