Class StringListTrait.Provider<T extends StringListTrait>

    • Constructor Summary

      Constructors 
      Constructor Description
      Provider​(ShapeId id, java.util.function.BiFunction<java.util.List<java.lang.String>,​SourceLocation,​T> traitFactory)  
    • Method Summary

      Modifier and Type Method Description
      T createTrait​(ShapeId id, Node value)
      Creates the trait from a node value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Provider

        public Provider​(ShapeId id,
                        java.util.function.BiFunction<java.util.List<java.lang.String>,​SourceLocation,​T> traitFactory)
        Parameters:
        id - The ID of the trait being created.
        traitFactory - The factory used to create the trait.
    • Method Detail

      • createTrait

        public T createTrait​(ShapeId id,
                             Node value)
        Description copied from interface: TraitService
        Creates the trait from a node value.
        Parameters:
        id - The shape targeted by the trait.
        value - The value of the trait.
        Returns:
        Returns the created trait.