Code example for LinkedList

Methods: removeLastsize

0
 
    @Override 
    public Object objectDone(){
        BSONObject o = (BSONObject)super.objectDone();
        String lastName = null;
        if ( _nameStack.size() > 0 ){
            lastName = _nameStack.removeLast();
        } 
        if ( ! ( o instanceof List ) && lastName != null &&
             o.containsField( "$ref" ) &&
             o.containsField( "$id" ) ){
            return cur().put(lastName, new DBRef( _db, o ) );
        } 
 
        return o;
    } 
 
    /** 
     * @return 
     * @throws MongoException 
     */