Class Audience

    • Constructor Detail

      • Audience

        public Audience​(String value)
        Creates a new audience identifier with the specified value.
        Parameters:
        value - The audience identifier value. Must not be null or empty string.
      • Audience

        public Audience​(URI value)
        Creates a new audience identifier with the specified URI value.
        Parameters:
        value - The URI value. Must not be null.
      • Audience

        public Audience​(Identifier value)
        Creates a new audience identifier with the specified value.
        Parameters:
        value - The value. Must not be null.
    • Method Detail

      • toSingleAudienceList

        public List<AudiencetoSingleAudienceList()
        Returns a singleton list of this audience.
        Returns:
        A singleton list consisting of this audience only.
      • toStringList

        public static List<StringtoStringList​(Audience audience)
        Returns a string list representation of the specified audience.
        Parameters:
        audience - The audience. May be null.
        Returns:
        The string list, null if the argument was null.
      • toStringList

        public static List<StringtoStringList​(List<Audience> audienceList)
        Returns a string list representation of the specified audience list.
        Parameters:
        audienceList - The audience list. May be null.
        Returns:
        The string list, null if the argument was null.
      • create

        public static List<Audiencecreate​(List<String> strings)
        Creates an audience list from the specified string list representation.
        Parameters:
        strings - The string list. May be null.
        Returns:
        The audience list, null if the argument was null.
      • create

        public static List<Audiencecreate​(String... strings)
        Creates an audience list from the specified string array.
        Parameters:
        strings - The strings. May be null.
        Returns:
        The audience list, null if the argument was null.
      • matchesAny

        public static boolean matchesAny​(Collection<Audience> c1,
                                         Collection<Audience> c2)
        Returns true if the specified collections have at at least one matching audience value.
        Parameters:
        c1 - The first audience collection. May be null.
        c2 - The second audience collection. May be null.
        Returns:
        true if the specified collections have at at least one matching audience value, false if there are no matches or either collection is null or empty.