Sha256: 4e306bcba189eab257704db06510bc1fb9a5e9ee8152e80d19c46ef292d9793c

Contents?: true

Size: 720 Bytes

Versions: 4

Compression:

Stored size: 720 Bytes

Contents

= OrderedSet

OrderSet is an class for storing sets of objects. Unlike a Set, it maintains the order of
the objects, but unlike an Array, each object can only exist once, and checking for
inclusion takes constant time.

== Usage:

  s = [1,3,2,3,4,3].to_ordered_set
  s.to_a
  # => [1,3,2,4]

  t = OrderedSet.new([6,7,5,6,5])
  t.to_a
  # => [6,7,5]

  (s + t).to_a
  # => [1,3,2,4,6,7,5]

  s << 5
  s.to_a
  # => [1,3,2,4,5]

  s.delete(1)
  s.to_a
  # => [3,2,4,5]

== Install:

  sudo gem install ninjudd-deep_clonable -s http://gems.github.com
  sudo gem install ninjudd-ordered_set -s http://gems.github.com

== License:

Copyright (c) 2008 Justin Balthrop, Geni.com; Published under The MIT License, see LICENSE

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ninjudd-ordered_set-0.1.0 README.rdoc
ordered_set-1.0.1 README.rdoc
ordered_set-1.0.0 README.rdoc
ordered_set-0.1.1 README.rdoc