Class: Java::Util::ArrayList
Instance Method Summary collapse
-
#uniq ⇒ Object
REMOVE when RubyMotion adds this.
-
#uniq! ⇒ Object
REMOVE when RubyMotion adds this.
Instance Method Details
#uniq ⇒ Object
REMOVE when RubyMotion adds this
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/project/ext/array_list.rb', line 4 def uniq if self.length <= 1 self else h = {} self.each do |el| h[el] = nil end h.keys end end |
#uniq! ⇒ Object
REMOVE when RubyMotion adds this
17 18 19 20 21 22 23 |
# File 'lib/project/ext/array_list.rb', line 17 def uniq! # This was failing with an array of views, TODO, check out = self.uniq self.clear self.addAll out self end |