public abstract class AbstractNamingScheme extends Object implements NamingScheme
Constructor and Description |
---|
AbstractNamingScheme(String delimiter)
Create a new Prefixer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(String id)
Determine if this identifier has been prefixed
|
Collection<String> |
deprefix(Collection<String> ids) |
String |
deprefix(String id)
Remove the prefix from the id
|
Collection<String> |
filterIds(Collection<String> ids)
Filter a collection of ids, retaining only those correctly prefixed.
|
protected String |
getDelimiter() |
protected abstract String |
getPrefix() |
Collection<String> |
prefix(Collection<String> ids) |
String |
prefix(String id)
Add the prefix to the id
|
public AbstractNamingScheme(String delimiter)
prefix
- The prefixdelimiter
- The delimiter to use between the prefix and the
identifier.public boolean accept(String id)
NamingScheme
accept
in interface NamingScheme
id
- the id to checkpublic String deprefix(String id)
NamingScheme
deprefix
in interface NamingScheme
id
- the prefixed idpublic String prefix(String id)
NamingScheme
prefix
in interface NamingScheme
id
- the id to prefixpublic Collection<String> filterIds(Collection<String> ids)
NamingScheme
filterIds
in interface NamingScheme
ids
- the collection of ides to filterpublic Collection<String> deprefix(Collection<String> ids)
deprefix
in interface NamingScheme
public Collection<String> prefix(Collection<String> ids)
prefix
in interface NamingScheme
protected abstract String getPrefix()
protected String getDelimiter()
Copyright © 2013 Seam Framework. All rights reserved.