Class CTFavourite


  • public final class CTFavourite
    extends Object
    Chemical terms favourite
    Author:
    Petr Hamernik
    • Field Detail

      • POPULARITY_MIN

        public static final int POPULARITY_MIN
        Less frequent (important) template
        See Also:
        Constant Field Values
      • POPULARITY_DEFAULT

        public static final int POPULARITY_DEFAULT
        Medium (default) importance of template
        See Also:
        Constant Field Values
      • POPULARITY_MAX

        public static final int POPULARITY_MAX
        Often used template - will be in top of the list when sorted by popularity
        See Also:
        Constant Field Values
    • Constructor Detail

      • CTFavourite

        public CTFavourite​(Class<? extends com.im.df.api.capabilities.DFFieldDataTypeCapability> type,
                           String displayName,
                           String ct)
      • CTFavourite

        public CTFavourite​(Class<? extends com.im.df.api.capabilities.DFFieldDataTypeCapability> type,
                           String displayName,
                           String expr,
                           int popularity)
    • Method Detail

      • getType

        public Class<? extends com.im.df.api.capabilities.DFFieldDataTypeCapability> getType()
        Expected default return type - one of the DFFieldDataTypeCapability subinterfaces.
        Returns:
        The class of the capability of the default return type
      • getDisplayName

        public String getDisplayName()
        Get the display name of the CT favourite
      • getExpression

        public String getExpression()
        Get the expression of the chemical terms favourite
      • getPopularity

        public int getPopularity()
        Get a value, how frequent (popular) is this favourite. This value can be used for some specific type of sorting list of favourites.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object