%
%  Node, 4.2.2: Knoten einer einfach verketteten Liste
%
classdef Node < handle

   properties ( Access = { ?List } )  
     next = Node.empty;
   end
   properties ( Access = protected ) 
     data = [];    % Daten 
   end     % properties

   methods
     function obj = Node( varargin )
       obj.next = Node.empty;
       if( nargin > 0 )
         obj.data = varargin{1};
       end
     end
     
     function delete( obj )
      fprintf( 'delete Node: Data = %g \n', obj.data );
     end    
     
     function disp( obj )
      fprintf( 'Node: Data = %g \n', obj.data );
     end  
     
     function nx = getNext( obj )
       nx = obj.next;
     end
     
   end   % methods  
   
end
