 
+###*
+extended array of objects, always sorted
 
+@class SortedList
+@extends Array
+@module interval-tree2
+###
 class SortedList extends Array
 
 
+    ###*
+    @constructor
+    @param {String} compareKey key name to compare objects. The value of the key must be a number.
+    ###
+
+    ###*
+    key name to compare objects. The value of the key must be a number.
+    @property {String} compareKey
+    ###
     constructor: (@compareKey) ->
-
-
-    @create: (compareKey) ->
-
-        new SortedList(compareKey)
 
 
 
     ###*
-    # sorted.insertOne(val)
-    # insert one value
-    # returns false if failed, inserted position if succeed
-    #
+    insert a value
+
+    @method insert
+    @param {any} val
+    @return {Number} inserted position
     ###
-    insertOne: (val) ->
+    insert: (val) ->
+
         pos = @bsearch(val)
-
-        if @_unique and @key(val, pos) != null
-            return false
-
-        if !@_filter(val, pos)
-            return false
 
         @splice pos + 1, 0, val
 

        return @

    ###*
    # sorted.bsearch(val)
    # @returns position of the value
    #
    ###

    bsearch: (val) ->

        return -1 if not @length

        mpos = undefined
        mval = undefined
        spos = 0
        epos = @length




    ###*
    remove the value in the given position

    @method remove
    @param {Number} pos position
    @return {SortedList} self
    ###
    remove: (pos) ->

