Package com.inductiveautomation.rm.base
Class RMKeyChainAggr
java.lang.Object
com.inductiveautomation.rm.base.RMKeyChainAggr
- All Implemented Interfaces:
- RMKey.Get,- RMKeyChain.Get
A class to evaluate keys on lists.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic doubleaverage(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static DoubleaverageX(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static intcount(List aList, RMKeyChain aKeyChain) Returns the count of the given list or if keychain is present, all non-null values.static intcountDeep(List aList, RMKeyChain aKeyChain) Returns the count of all non-null leaf nodes in given list.static intcountUnique(List aList, RMKeyChain aKeyChain) Returns the count of the unique values for a given list and key chain.static Listfilter(List aList, RMKeyChain aKeyChain) Returns the original list with items that fail the given boolean key chain removed.static Objectget(List aList, RMKeyChain aKeyChain) Returns the specific object that meets the criteria.static MethodgetAggrMethodImpl(String aName) Returns a method for a method name (assuming {List,KeyChain} args).getKeyChainValue(Object aRoot, RMKeyChain aKeyChain) Override to give list chance to implement this.getKeyValue(String aKey) Override to give list chance to implement this.static ObjectgetListValue(Object anObj, RMKeyChain aKeyChain) Silly method to support DatasetKeys like: List1Key.List2Key, which returns a flattened Master/Detail list.protected RMKeyChaingetMethodArgs(RMKeyChain aKeyChain) Returns the method args.protected StringgetMethodName(RMKeyChain aKeyChain) Returns the method name for a KeyChain.static Listgroup(List aList, RMKeyChain aKeyChain) Returns the original list grouped by the given key chain.static Stringjoin(List aList, RMKeyChain aKeyChain) Aggregator version of join.static ListlistOf(List aList, RMKeyChain aKeyChain) Returns a list of objects by evaluating keychain on given list.static Objectmax(List aList, RMKeyChain aKeyChain) Returns the maximum result of evaluating the keychain on given list objects.static Objectmin(List aList, RMKeyChain aKeyChain) Returns the minimum result of evaluating the keychain on given list objects.static booleanshouldRecurse(List aList, RMKeyChain aKeyChain) Returns whether given list should be recursed into for aggregate calculations.static doubletotal(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static doubletotal2(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static DoubletotalX(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls short circuit).
- 
Constructor Details- 
RMKeyChainAggrCreates a new RMKeyChainAggregator.
 
- 
- 
Method Details- 
getKeyValueOverride to give list chance to implement this.- Specified by:
- getKeyValuein interface- RMKey.Get
 
- 
getKeyChainValueOverride to give list chance to implement this.- Specified by:
- getKeyChainValuein interface- RMKeyChain.Get
 
- 
getMethodNameReturns the method name for a KeyChain.
- 
getMethodArgsReturns the method args.
- 
getAggrMethodImplReturns a method for a method name (assuming {List,KeyChain} args).
- 
totalReturns the total resulting from evaluating given keychain on given list of objects (nulls are zero).
- 
total2Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).
- 
totalXReturns the total resulting from evaluating given keychain on given list of objects (nulls short circuit).
- 
countReturns the count of the given list or if keychain is present, all non-null values.
- 
countDeepReturns the count of all non-null leaf nodes in given list.
- 
countUniqueReturns the count of the unique values for a given list and key chain.
- 
averageReturns the average resulting by evaluating the keychain on given list objects.
- 
averageXReturns the average resulting by evaluating the keychain on given list objects.
- 
minReturns the minimum result of evaluating the keychain on given list objects.
- 
maxReturns the maximum result of evaluating the keychain on given list objects.
- 
getReturns the specific object that meets the criteria.
- 
filterReturns the original list with items that fail the given boolean key chain removed.
- 
groupReturns the original list grouped by the given key chain.
- 
joinAggregator version of join. aKeyChain is an arglist with 2 args, as in join(getName, "\n") The first arg is the keychain to be evaluated for each object in list, and the second arg is the separator string.
- 
listOfReturns a list of objects by evaluating keychain on given list.
- 
shouldRecurseReturns whether given list should be recursed into for aggregate calculations.
- 
getListValueSilly method to support DatasetKeys like: List1Key.List2Key, which returns a flattened Master/Detail list.
 
-