Package org.eolang

Class UniverseDefault

  • All Implemented Interfaces:
    Universe

    public final class UniverseDefault
    extends Object
    implements Universe
    Default implementation that can be used on the java side.
    Since:
    0.32
    • Constructor Detail

      • UniverseDefault

        public UniverseDefault​(Phi connector,
                               Map<Integer,​Phi> indexed)
        Ctor.
        Parameters:
        connector - Connector.
        indexed - Map to index eo objects.
      • UniverseDefault

        public UniverseDefault​(Phi connector)
        Ctor.
        Parameters:
        connector - Connector.
    • Method Detail

      • find

        public int find​(String name)
        Description copied from interface: Universe
        Finds vertex of eo object by its location.
        Specified by:
        find in interface Universe
        Parameters:
        name - Relative location of the object to find like "^.^.some-obj".
        Returns:
        Vertex of the object to find.
      • put

        public void put​(int vertex,
                        byte[] bytes)
        Description copied from interface: Universe
        Puts data to eo object by vertex.
        Specified by:
        put in interface Universe
        Parameters:
        vertex - Vertex off object.
        bytes - Data to put.
      • bind

        public void bind​(int parent,
                         int child,
                         String att)
        Description copied from interface: Universe
        Binds child to parent.
        Specified by:
        bind in interface Universe
        Parameters:
        parent - Vertex of the parent eo object.
        child - Vertex of the child eo object.
        att - Name of attribute.
      • copy

        public int copy​(int vertex)
        Description copied from interface: Universe
        Copies the eo object.
        Specified by:
        copy in interface Universe
        Parameters:
        vertex - Vertex of object to copy.
        Returns:
        Vertex of the copy.
      • dataize

        public byte[] dataize​(int vertex)
        Description copied from interface: Universe
        Dataizes the eo object by vertex and return byte array.
        Specified by:
        dataize in interface Universe
        Parameters:
        vertex - Vertex of eo-object.
        Returns:
        Raw data.