They are distinct instruments with their own individual voices. When a composer is working on an arrangement idea, s/he can conceptuallise a sound based on one instrument or on several. A flugelhorn and soprano sound different from a trumpet and tenor. A violin sounds different to a viola, even playing the same notes etc. Musicians playing bass can often make the mistake of thinking that the double bass and electric bass, because they play the same notes on the same stave, are interchangeable. But they have a different effect due to timbre, attack and decay. If you want a piece to swing like your Frank Sinatra arrangement, then it is unlikely that the electric bass will work (there are thousands of recordings of bands playing Jazz using electric basses that don't swing and plaenty that do but we are talking in generlaisms). It doesn't mean that a performer can't make an aesthetic decision to use a different voice to achieve a different effect etc but, the straight answer is, no, an electric bass cannot do what a double bass does and vice versa. Sometimes close but rarely a cigar They are different instruments which have a lot in common just like a drummer and percussionist.