Class: Immutable::SortedSet::AVLNode::Empty

Inherits:
Object
  • Object
show all
Defined in:
lib/immutable/sorted_set.rb

Direct Known Subclasses

PlainAVLNode::Empty

Instance Method Summary collapse

Constructor Details

#initialize(comparator) ⇒ Empty

Returns a new instance of Empty.



1390
# File 'lib/immutable/sorted_set.rb', line 1390

def initialize(comparator); @comparator = comparator; end

Instance Method Details

#at(index) ⇒ Object



1400
# File 'lib/immutable/sorted_set.rb', line 1400

def at(index); nil; end

#between(from, to) ⇒ Object



1416
# File 'lib/immutable/sorted_set.rb', line 1416

def between(from, to);       self; end

#bulk_delete(items) ⇒ Object



1410
# File 'lib/immutable/sorted_set.rb', line 1410

def bulk_delete(items); self; end

#bulk_insert(items) ⇒ Object



1404
1405
1406
1407
1408
1409
# File 'lib/immutable/sorted_set.rb', line 1404

def bulk_insert(items)
  items = items.to_a if !items.is_a?(Array)
  items = items.sort(&@comparator)
  SortedSet.uniq_by_comparator!(items, @comparator)
  AVLNode.from_items(items, @comparator)
end

#delete(item) ⇒ Object



1412
# File 'lib/immutable/sorted_set.rb', line 1412

def delete(item);       throw :not_present; end

#drop(n) ⇒ Object



1420
# File 'lib/immutable/sorted_set.rb', line 1420

def drop(n);             self; end

#eachObject



1398
# File 'lib/immutable/sorted_set.rb', line 1398

def each;           end

#each_between(item, inclusive) ⇒ Object



1419
# File 'lib/immutable/sorted_set.rb', line 1419

def each_between(item, inclusive); end

#each_greater(item, inclusive) ⇒ Object



1417
# File 'lib/immutable/sorted_set.rb', line 1417

def each_greater(item, inclusive); end

#each_less(item, inclusive) ⇒ Object



1418
# File 'lib/immutable/sorted_set.rb', line 1418

def each_less(item, inclusive);    end

#empty?Boolean

Returns:

  • (Boolean)


1422
# File 'lib/immutable/sorted_set.rb', line 1422

def empty?;              true; end

#heightObject



1394
# File 'lib/immutable/sorted_set.rb', line 1394

def height;   0;    end

#include?(item) ⇒ Boolean

Returns:

  • (Boolean)


1413
# File 'lib/immutable/sorted_set.rb', line 1413

def include?(item);     false; end

#insert(item) ⇒ Object



1401
1402
1403
# File 'lib/immutable/sorted_set.rb', line 1401

def insert(item)
  AVLNode.new(item, @comparator, self, self)
end

#keep_only(items) ⇒ Object



1411
# File 'lib/immutable/sorted_set.rb', line 1411

def keep_only(items);   self; end

#leftObject



1392
# File 'lib/immutable/sorted_set.rb', line 1392

def left;  self;    end

#maxObject



1397
# File 'lib/immutable/sorted_set.rb', line 1397

def max;    nil;    end

#minObject



1396
# File 'lib/immutable/sorted_set.rb', line 1396

def min;    nil;    end

#natural_order?Boolean

Returns:

  • (Boolean)


1391
# File 'lib/immutable/sorted_set.rb', line 1391

def natural_order?; false; end

#prefix(item, inclusive) ⇒ Object



1414
# File 'lib/immutable/sorted_set.rb', line 1414

def prefix(item, inclusive); self; end

#reverse_eachObject



1399
# File 'lib/immutable/sorted_set.rb', line 1399

def reverse_each;   end

#rightObject



1393
# File 'lib/immutable/sorted_set.rb', line 1393

def right; self;    end

#sizeObject



1395
# File 'lib/immutable/sorted_set.rb', line 1395

def size;     0;    end

#slice(from, length) ⇒ Object



1423
# File 'lib/immutable/sorted_set.rb', line 1423

def slice(from, length); self; end

#suffix(item, inclusive) ⇒ Object



1415
# File 'lib/immutable/sorted_set.rb', line 1415

def suffix(item, inclusive); self; end

#take(n) ⇒ Object



1421
# File 'lib/immutable/sorted_set.rb', line 1421

def take(n);             self; end