org.tm4j.topicmap.utils.extractors
Class SizeExtractor

java.lang.Object
  extended byorg.tm4j.topicmap.utils.extractors.SizeExtractor
All Implemented Interfaces:
uk.co.jezuk.mango.UnaryFunction

public class SizeExtractor
extends java.lang.Object
implements uk.co.jezuk.mango.UnaryFunction

Extracts an integer representing the size of the input object If the input object is a collection, returns the count of the number of objects contained in the collection. If the intput object is null, return 0. All other input values will return 1


Constructor Summary
SizeExtractor()
           
 
Method Summary
 java.lang.Object fn(java.lang.Object in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeExtractor

public SizeExtractor()
Method Detail

fn

public java.lang.Object fn(java.lang.Object in)
Specified by:
fn in interface uk.co.jezuk.mango.UnaryFunction