I believe it is Single Abstract Method. Used as a description for many interfaces.
Typical examples are Runnable, Callable, Predicate, and Function. We have plenty of others at work, but they are all some form of Function. Typically the only real difference is number of parameters. And... likely where they are used. It is this walled garden of where they can be used that gets annoying quick. You wind up with many small utilities to convert one into another such that other logic can be shared. I believe it is telling that there are utility methods in Functions to convert a Predicate into a Function. (Or, in Predicates, utilities to make Predicates work with Functions.) (I should add, Function and Predicate are from the Google Collections.) An example from Spring would be something like Converter (which is essentially Function, but instead of apply, the method is convert.) Of course... there could be another SAM. Acronym finder didn't verify this for me. :( On Fri, Aug 27, 2010 at 9:21 PM, Mark Volkmann <[email protected]>wrote: > What is a SAM? > > On Fri, Aug 27, 2010 at 6:23 PM, Reinier Zwitserloot <[email protected]> > wrote: > > I think virtually everybody disagrees with you; SAMs aren't nasty. > > Whatever makes you think they are? > > > > On Aug 27, 9:03 pm, Kevin Wright <[email protected]> wrote: > >> What really gets my goat though... It's the pro-java/anti-scala crowd > >> who are pushing the claim that "Scala is only for smart people". > >> > >> Myself, and the rest of the Scala evangelists on this list are going > >> to great pains to point out that: no, actually, Scala is for everyone. > >> > >> I don't think that anyone here disagrees about how nasty SAM's are :) > > -- > R. Mark Volkmann > Object Computing, Inc. > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<javaposse%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
