Package net.shibboleth.idp.authn.principal

# Class IdPAttributePrincipal

java.lang.Object
net.shibboleth.idp.authn.principal.IdPAttributePrincipal

All Implemented Interfaces:
  `Principal`

public class IdPAttributePrincipal extends Object implements Principal
Principal that wraps an `IdPAttribute`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private IdPAttribute`
`attribute`
The wrapped attribute.

## Constructor Summary

Constructors
Constructor
Description
`IdPAttributePrincipal(IdPAttribute attr)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`IdPAttribute`
`getAttribute()`
Get the `IdPAttribute`.
`String`
`getName()`
`int`
`hashCode()`
`String`
`toString()`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`implies`

## Field Details

### attribute

@Nonnull private IdPAttribute attribute
The wrapped attribute.

## Constructor Details

### IdPAttributePrincipal

public IdPAttributePrincipal(@Nonnull @ParameterName(name="attr") IdPAttribute attr)
Constructor.

Parameters:
  `attr` - the attribute

## Method Details

### getName

@Nonnull @NotEmpty public String getName()

Specified by:
  `getName` in interface `Principal`

### getAttribute

@Nonnull public IdPAttribute getAttribute()
Get the `IdPAttribute`.

Returns:
  the attribute

### hashCode

public int hashCode()

Specified by:
  `hashCode` in interface `Principal`
Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object other)

Specified by:
  `equals` in interface `Principal`
Overrides:
  `equals` in class `Object`

### toString

public String toString()

Specified by:
  `toString` in interface `Principal`
Overrides:
  `toString` in class `Object`