Example #1
0
        /*
         * Adds the specified object to this {@code TreeSet}.
         *
         * @param object
         *            the object to add.
         * @return {@code true} when this {@code TreeSet} did not already contain
         *         the object, {@code false} otherwise.
         * @throws ClassCastException
         *             when the object cannot be compared with the elements in this
         *             {@code TreeSet}.
         * @throws NullPointerException
         *             when the object is null and the comparator cannot handle
         *             null.
         */

        public override bool add(E obj)
        {
            return(backingMap.put(obj, java.lang.Boolean.TRUE) == null);
        }