Package org.eolang

Class PhCached

java.lang.Object
org.eolang.PhCached
All Implemented Interfaces:
Data, Phi

public final class PhCached extends Object implements Phi
Cached Phi.

It's highly recommended to use it with PhComposite.

Since:
0.1
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eolang.Data

    Data.ToPhi
  • Field Summary

    Fields inherited from interface org.eolang.Phi

    LAMBDA, PHI, RHO, Φ
  • Constructor Summary

    Constructors
    Constructor
    Description
    PhCached(Phi attr)
    Ctor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Make a copy, leaving it at the same parent.
    copy(Phi self)
    Copy self object.
    byte[]
    Take the data.
    Get forma of the phi.
    boolean
    Returns true if object has bound rho attribute.
    Get code locator of the phi.
    void
    put(int pos, Phi object)
    Put object by position of the attribute.
    void
    put(String name, Phi object)
    Put object by name of the attribute.
    take(int pos)
    Take object by position of the attribute.
    take(String name)
    Take object by name of the attribute.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PhCached

      public PhCached(Phi attr)
      Ctor.
      Parameters:
      attr - Origin attribute
  • Method Details

    • copy

      public Phi copy(Phi self)
      Description copied from interface: Phi
      Copy self object.
      Specified by:
      copy in interface Phi
      Parameters:
      self - Self
      Returns:
      Copy of self
    • 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
    • hasRho

      public boolean hasRho()
      Description copied from interface: Phi
      Returns true if object has bound rho attribute.
      Specified by:
      hasRho in interface Phi
      Returns:
      True if object has rho bound attribute
    • take

      public Phi take(String name)
      Description copied from interface: Phi
      Take object by name of the attribute.
      Specified by:
      take in interface Phi
      Parameters:
      name - The name of the attribute
      Returns:
      The object
    • take

      public Phi take(int pos)
      Description copied from interface: Phi
      Take object by position of the attribute.
      Specified by:
      take in interface Phi
      Parameters:
      pos - The position of the attribute
      Returns:
      The object
    • put

      public void put(int pos, Phi object)
      Description copied from interface: Phi
      Put object by position of the attribute.
      Specified by:
      put in interface Phi
      Parameters:
      pos - The position of the attribute.
      object - The object to put
    • put

      public void put(String name, Phi object)
      Description copied from interface: Phi
      Put object by name of the attribute.
      Specified by:
      put in interface Phi
      Parameters:
      name - The name of the attribute.
      object - The object to put
    • 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
    • forma

      public String forma()
      Description copied from interface: Phi
      Get forma of the phi.
      Specified by:
      forma in interface Phi
      Returns:
      Forma of it as String.
    • delta

      public byte[] delta()
      Description copied from interface: Data
      Take the data.
      Specified by:
      delta in interface Data
      Returns:
      The data