struct Set(T)

Superclass hierarchy

Object
Value
Struct
Set(T)

Included Modules

Enumerable(T), Iterable

Defined in:

Class Method Summary

Instance Method Summary

Class Method Detail

def self.new(enumerable : Enumerable(T))

def self.new

Instance Method Detail

def &(other : Set)

def <<(object : T)

def ==(other : Set)

def add(object : T)

def clear

def delete(object)

def dup

def each(&block)

def each

def empty?

def hash

def includes?(object)

def inspect(io)

def intersects?(other : Set)

Returns true if the set and the given set have at least one element in common.

Set{1, 2, 3}.intersects? Set{4, 5} # => false
Set{1, 2, 3}.intersects? Set{3, 4} # => true

def length

def merge(elems)

def object_id

def same?(other : Set)

def size

def subset?(other : Set)

def superset?(other : Set)

def to_a

def to_s(io)

def |(other : Set(U))