Package net.shibboleth.idp.attribute.resolver.ad.mapped.impl

# Class ValueMap

java.lang.Object
net.shibboleth.idp.attribute.resolver.ad.mapped.impl.ValueMap

All Implemented Interfaces:
  `Function<String,Set<StringAttributeValue>>`

public class ValueMap extends Object implements Function<String,Set<StringAttributeValue>>
Performs many to one mapping of source values to a return value. SourceValue strings may include regular expressions and the ReturnValue may include back references to capturing groups as supported by `Pattern`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`returnValue`
Return value.
`private Collection<SourceValue>`
`sourceValues`
Source values.

## Constructor Summary

Constructors
Constructor
Description
`ValueMap()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Set<StringAttributeValue>`
`apply(String attributeValue)`
Evaluate an incoming attribute value against this value map.
`String`
`getReturnValue()`
Gets the return value.
`Collection<SourceValue>`
`getSourceValues()`
Gets the collection of source values.
`void`
`setReturnValue(String newReturnValue)`
Sets the return value.
`void`
`setSourceValues(Collection<SourceValue> newValues)`
Sets the Source values for the mapping.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### returnValue

private String returnValue
Return value.

### sourceValues

@Nonnull private Collection<SourceValue> sourceValues
Source values.

## Constructor Details

### ValueMap

public ValueMap()
Constructor.

## Method Details

### getReturnValue

@Nullable public String getReturnValue()
Gets the return value.

Returns:
  the return value

### setReturnValue

public void setReturnValue(@Nonnull @NotEmpty String newReturnValue)
Sets the return value.

Parameters:
  `newReturnValue` - the return value

### setSourceValues

public void setSourceValues(@Nullable Collection<SourceValue> newValues)
Sets the Source values for the mapping.

Parameters:
  `newValues` - functions used to map an input value to an output value

### getSourceValues

@Nonnull @Unmodifiable @NotLive public Collection<SourceValue> getSourceValues()
Gets the collection of source values.

Returns:
  the collection of source values

### apply

@Nullable public Set<StringAttributeValue> apply(@Nullable String attributeValue)
Evaluate an incoming attribute value against this value map.

Specified by:
  `apply` in interface `Function<String,Set<StringAttributeValue>>`
Parameters:
  `attributeValue` - incoming attribute value
Returns:
  set of new values the incoming value mapped to