function self = push(self, data)
%PUT Put data in the queue 
%   queue = put(queue,data)
%
% $Id$

% if data isempty, no action
% --------------------------
if isempty(data)
  return
end

% if new entrie is equal to last entry, no action
% use short circuit operator, second expression (isequal) isn't evaluate 
% if first expression (isempty) is true
% -----------------------------------------------
if isempty(self.data) || ~isequal(data, self.data{end})

  % set internal queue structure
  % ----------------------------
  self.index = self.index+1;
  %self.lifo(end+1,:) = data;
  self.data{end+1} = data;
  
  % if lifo not empty, pop dosn't follow wtih get
  % ---------------------------------------------
  if ~isempty(self.lifo)
    self.lifo = [];
  end
  
else
  return
end