Class Promoter


  • public class Promoter
    extends Object
    • Constructor Detail

      • Promoter

        public Promoter()
    • Method Detail

      • uriFromString

        public static URI uriFromString​(String url)
        Create a @see java.net.URI from a string
        Parameters:
        url - url to convert
        Returns:
        built @see java.net.URI
      • phoneNumberFromString

        public static PhoneNumber phoneNumberFromString​(String pn)
        Create a @see com.twilio.types.PhoneNumber from a string
        Parameters:
        pn - PhoneNumber to convert
        Returns:
        built @see com.twilio.types.PhoneNumber
      • twimlFromString

        public static Twiml twimlFromString​(String twiml)
        Create a @see com.twilio.types.Twiml from a string
        Parameters:
        twiml - Twiml to convert
        Returns:
        built @see com.twilio.types.Twiml
      • listOfOne

        public static <T> List<T> listOfOne​(T one)
        Create a list from a single element.
        Type Parameters:
        T - type of the element
        Parameters:
        one - the single element
        Returns:
        List containing the single element
      • enumFromString

        public static <T extends Enum<?>> T enumFromString​(String value,
                                                           T[] values)
        Convert a string to a enum type.
        Type Parameters:
        T - enum type
        Parameters:
        value - string value
        values - enum values
        Returns:
        converted enum if able to convert; null otherwise