Package org.opensaml.security.criteria

# Class PeerEntityIDCriterion

java.lang.Object
org.opensaml.security.criteria.PeerEntityIDCriterion

All Implemented Interfaces:
  `Criterion`

public final class PeerEntityIDCriterion extends Object implements Criterion
An implementation of `Criterion` which specifies criteria pertaining to peer entity IDs. This is typically used only in conjunction with a `EntityIdCriterion`, where the peer is interpreted to be relative to that primary entity ID. In this sense it serves to scope the primary entity ID. Note that the peer entity ID may be either local or remote, depending on whether the associated primary entity ID is remote or local.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`peerID`
Peer entity ID criteria.

## Constructor Summary

Constructors
Constructor
Description
`PeerEntityIDCriterion(String peer)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getPeerID()`
Get the entity ID which is the peer relative to a primary entity ID.
`int`
`hashCode()`
`void`
`setPeerID(String peer)`
Set the entity ID which is the peer relative to a primary entity ID.
`String`
`toString()`
`String`
`validatePeerID(String peer)`
Validate peer ID criterion.

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

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

## Field Details

### peerID

@Nonnull @NotEmpty private String peerID
Peer entity ID criteria.

## Constructor Details

### PeerEntityIDCriterion

public PeerEntityIDCriterion(@Nonnull @NotEmpty String peer)
Constructor.

Parameters:
  `peer` - the entity ID which is the peer relative to a primary entity ID

## Method Details

### getPeerID

@Nonnull @NotEmpty public String getPeerID()
Get the entity ID which is the peer relative to a primary entity ID.

Returns:
  the peer entity ID.

### setPeerID

public void setPeerID(@Nonnull @NotEmpty String peer)
Set the entity ID which is the peer relative to a primary entity ID.

Parameters:
  `peer` - The peerID to set.

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### validatePeerID

@Nonnull @NotEmpty public String validatePeerID(@Nonnull @NotEmpty String peer)
Validate peer ID criterion.

Parameters:
  `peer` - ID to check
Returns:
  the input if non-null/empty