hexBinaryUnion Function Description

Description

This function takes two or more arguments that are both a bag of hexBinary values. It returns a bag of hexBinary such that it contains all elements of all the argument bags. The function gets rid of duplicates, as determined by the equality functions.

hexBinaryUnion belongs to the ALFA function reference's Set functions category. It maps to the XACML function identifier urn:oasis:names:tc:xacml:1.0:function:hexBinary-union, takes 2 or more arguments and returns a value of type A bag of values of type hexBinary with no duplicates..

Property Value
Category Set functions
# Arguments 2 or more
Arguments
  • A bag of type hexBinary
  • A bag of type hexBinary
  • Optionally more bags of type hexBinary
Return Value A bag of values of type hexBinary with no duplicates.
Expressed As pre-fix
Representation ALFA short name
Allowed In Target false
ALFA Shorthand None
Commutative true

Example

/**
* Permit if the integer pickedNumber in the list of lucky numbers (integer) or extra numbers. Note here the
* use of the function inside a condition as it is used to compare 2 attributes.
*/
rule integerUnionExample{
    condition integerIsIn(integerOneAndOnly(pickedNumber), integerUnion(luckyNumbers, extraNumbers))
    permit
}

In this example, we use the hexBinaryUnion function in conjunction with hexBinaryIsIn to determine whether a single atomic value is in the union of 2 bags of values. This also shows how functions can be combined together in ALFA.