Raw coffee grounds are not good for every plant because there is a naturally occurring trace herbicide in them. Never put them on tomatoes. Some plants it can kill, but mostly it will stunt the growth or fruiting capability. I do not know how it could effect figs. Composting it leaves no trace of this, and makes the composting process of other materials faster because of there high nitrogen content. They also have lots of other trace elements beneficial to plants.
As for as compost made with coffee grounds, it is what my first two fig trees are growing in. I got these two single stem rooted cuttings in April. The one I planted in a 10 gallon pot and it grew like crazy but no figs from it, but the other I planted in a half of a 55 gallon plastic barrel, filled the bottom 8 inches with coffee grounds, then filled the rest with my compost and peat mixture. 23 figs from it this year but they came to late and I had to cut them off so I could put the tree to bed for the winter.
Coffee grounds should never be put into the trash headed for the land fill. They have been attributed to the number one cause of green house gas production. You see, when you compost on top of the soil, the bacteria & microbes that breakdown the materials also use oxygen, (aerobic bacteria) and they do not produce the bad gases. In a land fill, they do not have oxygen to use so the breakdown is done by the anaerobic bacteria and these produce the bad greenhouse gases.
The links I have seen posted by others are very good and tell the story well.
A little about me, I work for a large commercial coffee machine manufacturer, and we produce a lot of used grounds in our testing and research department. We also have coffee available for the employees. ALL the grounds, about 100 pounds a week, go home with me for my garden and composting piles. I do not want to see them in the trash.