Package org.eolang

Class PhLocated

  • All Implemented Interfaces:
    Phi, Term

    public final class PhLocated
    extends Object
    implements Phi
    An object with coordinates (line and position).
    Since:
    0.21
    • Constructor Detail

      • PhLocated

        public PhLocated​(Phi phi,
                         int lne,
                         int pos)
        Ctor.
        Parameters:
        phi - The object
        lne - Line
        pos - Position
    • 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 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
      • move

        public void move​(Phi rho)
        Description copied from interface: Phi
        Move it to a new parent.
        Specified by:
        move in interface Phi
        Parameters:
        rho - New \rho to attach to
      • attr

        public 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 Attr attr​(String attr)
        Description copied from interface: Phi
        Get attribute.
        Specified by:
        attr in interface Phi
        Parameters:
        attr - The name of the attribute
        Returns:
        The attr