Package org.eolang
Class PhSafe
- java.lang.Object
-
- org.eolang.PhSafe
-
public final class PhSafe extends Object implements Phi, Atom
An object with coordinates (line and position) and a safe processing of any runtime errors.It is used to wrap any object and provide a safe processing of any runtime errors. It is used in the EO runtime to provide a safe processing of any runtime errors in the EO code. If, in any method invocation, a runtime error occurs, it is caught and wrapped into
EOerror.ExErrorwith the location of the error in the EO code.- Since:
- 0.21
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eolang.Data
Data.ToPhi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Phicopy()Make a copy, leaving it at the same parent.Phicopy(Phi self)Copy self object.byte[]delta()Take the data.booleanequals(Object obj)Stringforma()Get forma of the phi.inthashCode()booleanhasRho()Returns true if object has bound rho attribute.Philambda()Executes λ function and calculates object.Stringlocator()Get code locator of the phi.voidput(int pos, Phi object)Put object by position of the attribute.voidput(String nme, Phi object)Put object by name of the attribute.Phitake(int pos)Take object by position of the attribute.Phitake(String name)Take object by name of the attribute.
-
-
-
Method Detail
-
copy
public Phi copy()
Description copied from interface:PhiMake a copy, leaving it at the same parent.
-
hasRho
public boolean hasRho()
Description copied from interface:PhiReturns true if object has bound rho attribute.
-
take
public Phi take(String name)
Description copied from interface:PhiTake object by name of the attribute.
-
take
public Phi take(int pos)
Description copied from interface:PhiTake object by position of the attribute.
-
put
public void put(int pos, Phi object)Description copied from interface:PhiPut object by position of the attribute.
-
put
public void put(String nme, Phi object)
Description copied from interface:PhiPut object by name of the attribute.
-
delta
public byte[] delta()
Description copied from interface:DataTake the data.
-
-