Class DefaultItemFunction<T extends Nameable>

  • All Implemented Interfaces:
    JepFunction, org.nfunk.jep.function.PostfixMathCommandI

    public class DefaultItemFunction<T extends Nameable>
    extends Object
    implements JepFunction
    JEP function that can be used to return the name of a default item in a project. The constructor need to specify the project and the type of item to look for. Use 'default()' or 'default(col("header"))' in the JEP expression to use this function. The first variant will always return the default item if one exists for the project. The second variant will return the default item only if the 'col("header")' part is null or an empty string.

    Before this function is used the setCurrentSubtype(ItemSubtype) can be called to limit the search to items with a specific subtype. If there is more than one matching item in a project, it is undefined which one is returned, but multiple uses of this function will return the same item.

    Since:
    3.1
    Author:
    Nicklas
    Last modified
    $Date: 2019-03-01 09:42:54 +0100 (fre, 01 mars 2019) $