public class AbstractIdentifier extends Object implements Identifier
Identifier. Validates the identifier during instantiation, also
overrides equals, hashcode and toString methods.| Constructor and Description |
|---|
AbstractIdentifier(String identifier,
Pattern pattern)
Creates a new identifier by validating it with the given pattern.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getIdentifier()
Returns the string representation of the identifier.
|
int |
hashCode() |
String |
toString() |
public AbstractIdentifier(String identifier, Pattern pattern) throws IllegalArgumentException
identifier - The new identifier.pattern - A pattern to validate with.IllegalArgumentException - If the identifier not valid.public String getIdentifier()
IdentifiergetIdentifier in interface IdentifierCopyright © 2017. All rights reserved.