Package net.shibboleth.idp.attribute.transcoding

# Class BasicNamingFunction<T>

java.lang.Object
net.shibboleth.idp.attribute.transcoding.BasicNamingFunction<T>

Type Parameters:
  `T` - type of object

All Implemented Interfaces:
  `AttributeTranscoderRegistry.NamingFunction<T>`

public class BasicNamingFunction<T> extends Object implements AttributeTranscoderRegistry.NamingFunction<T>
Basic implementation of a `AttributeTranscoderRegistry.NamingFunction`.

Since:
  4.1.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Function<T,String>`
`namingFunction`
Naming function.
`private final Class<T>`
`objectType`
Object type.

## Constructor Summary

Constructors
Constructor
Description
`BasicNamingFunction(Class<T> claz, Function<T,String> function)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Function<T,String>`
`getFunction()`
Gets the function that produces a name for an input object.
`Class<T>`
`getType()`
Gets the type of object supported.

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

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

## Field Details

### objectType

@Nonnull private final Class<T> objectType
Object type.

### namingFunction

@Nonnull private final Function<T,String> namingFunction
Naming function.

## Constructor Details

### BasicNamingFunction

public BasicNamingFunction(@Nonnull @ParameterName(name="claz") Class<T> claz, @Nonnull @ParameterName(name="function") Function<T,String> function)
Constructor.

Parameters:
  `claz` - object type
  `function` - naming function

## Method Details

### getType

@Nonnull public Class<T> getType()
Gets the type of object supported.

Specified by:
  `getType` in interface `AttributeTranscoderRegistry.NamingFunction<T>`
Returns:
  object type

### getFunction

@Nonnull public Function<T,String> getFunction()
Gets the function that produces a name for an input object.

Specified by:
  `getFunction` in interface `AttributeTranscoderRegistry.NamingFunction<T>`
Returns:
  naming function