Package org.apache.sling.testing.clients.util

# Class UniquePaths

java.lang.Object
org.apache.sling.testing.clients.util.UniquePaths

public class UniquePaths extends Object
Generate unique paths, for tests isolation

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SEP`
`static final String`
`U_PATTERN`

## Constructor Summary

Constructors
Constructor
Description
`UniquePaths()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`get(Object nameReference)`
Get a unique ID with no base path
`static String`
`get(Object nameReference, String basePath)`
Return a unique path based on basePath

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

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

## Field Details

### SEP

public static final String SEP

See Also:
  - Constant Field Values

### U_PATTERN

public static final String U_PATTERN

See Also:
  - Constant Field Values

## Constructor Details

### UniquePaths

public UniquePaths()

## Method Details

### get

public static String get(Object nameReference, String basePath)
Return a unique path based on basePath

Parameters:
  `nameReference` - The simple class name of that object is used as part of the generated unique ID
  `basePath` - All occurrences of `U_PATTERN` in basePath are replaced by the generated unique ID. If $U$ is not found in basePath, unique ID is added at its end.
Returns:
  path with a unique value for each call.

### get

public static String get(Object nameReference)
Get a unique ID with no base path

Parameters:
  `nameReference` - The simple class name of that object is used as part of the generated unique ID
Returns:
  path with a unique value for each call