gw.lang.enhancements.CoreArrayEnhancementHelper.gsx Maven / Gradle / Ivy
package gw.lang.enhancements
/**
* This enhancement allows for some overloading of methods that would be in CoreArrayEnhancement,
* but can't because of the methods erasure
*
* Copyright 2014 Guidewire Software, Inc.
*/
enhancement CoreArrayEnhancementHelper : T[] {
reified function flatMap( mapper(elt:T):R[] ) : R[] {
return this.fastList().flatMap( \ elt -> mapper( elt ).fastList() ).toTypedArray()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy