Class Functions


  • public class Functions
    extends Object
    Static utility methods pertaining to Function instances.

    All methods return serializable functions as long as they're given serializable parameters.

    See the Guava User Guide article on the use of Function.

    • Constructor Summary

      Constructors 
      Constructor Description
      Functions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.common.base.Function<org.eclipse.emf.ecore.EStructuralFeature,​String> featureName()
      Returns a function that returns name of EStructuralFeature
      static com.google.common.base.Function<org.eclipse.emf.ecore.EStructuralFeature,​String> featureToLabel()
      Returns a function that returns label by EStructuralFeature
      static <F,​T>
      com.google.common.base.Function<F,​T>
      fromAdapter​(Class<T> type)
      Returns a function based on adaptable object.
      static com.google.common.base.Function<Object,​Object> fromConverter​(org.eclipse.core.databinding.conversion.IConverter converter)
      Returns a function based on databinding-converter
      static com.google.common.base.Function<org.eclipse.emf.ecore.EEnumLiteral,​org.eclipse.emf.common.util.Enumerator> literalToEnumerator()
      Returns a function that returns Enumerator by EEnumLiteral
      static com.google.common.base.Function<org.eclipse.emf.ecore.EEnumLiteral,​String> literalToLabel()
      Returns a function that returns label by EEnumLiteral
    • Constructor Detail

      • Functions

        public Functions()
    • Method Detail

      • featureToLabel

        public static com.google.common.base.Function<org.eclipse.emf.ecore.EStructuralFeature,​String> featureToLabel()
        Returns a function that returns label by EStructuralFeature
      • literalToLabel

        public static com.google.common.base.Function<org.eclipse.emf.ecore.EEnumLiteral,​String> literalToLabel()
        Returns a function that returns label by EEnumLiteral
      • literalToEnumerator

        public static com.google.common.base.Function<org.eclipse.emf.ecore.EEnumLiteral,​org.eclipse.emf.common.util.Enumerator> literalToEnumerator()
        Returns a function that returns Enumerator by EEnumLiteral
      • featureName

        public static com.google.common.base.Function<org.eclipse.emf.ecore.EStructuralFeature,​String> featureName()
        Returns a function that returns name of EStructuralFeature
      • fromConverter

        public static com.google.common.base.Function<Object,​Object> fromConverter​(org.eclipse.core.databinding.conversion.IConverter converter)
        Returns a function based on databinding-converter
      • fromAdapter

        public static <F,​T> com.google.common.base.Function<F,​T> fromAdapter​(Class<T> type)
        Returns a function based on adaptable object.