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.byte[]delta()Take the data.booleanequals(Object obj)Stringforma()Get forma of the phi.inthashCode()Philambda()Executes λ function and calculates object.Stringlocator()Get code locator of the phi.booleanput(int pos, Phi object)Put object by position of the attribute.booleanput(String nme, Phi object)Put object by name 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.
-
take
public Phi take(String name)
Description copied from interface:PhiTake object by name of the attribute.
-
put
public boolean put(int pos, Phi object)Description copied from interface:PhiPut object by position of the attribute.
-
put
public boolean 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.
-
-