|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.uadetector.internal.data.domain.DevicePattern.Builder
@NotThreadSafe public static final class DevicePattern.Builder
Factory that creates instances of DevicePattern via method calls.
| Constructor Summary | |
|---|---|
DevicePattern.Builder()
|
|
| Method Summary | |
|---|---|
DevicePattern |
build()
Builds a new instance of DevicePattern and returns it. |
DevicePattern.Builder |
setId(int id)
Sets the identification number of a device pattern entry. |
DevicePattern.Builder |
setId(java.lang.String id)
Sets the identification number (ID) of a device pattern. |
DevicePattern.Builder |
setPattern(java.util.regex.Pattern pattern)
Sets a regular expression for a device pattern. |
DevicePattern.Builder |
setPerlRegularExpression(java.lang.String regex)
Converts a PERL regular expression in a Java regular expression and sets it in the Builder. |
DevicePattern.Builder |
setPosition(int position)
Sets the position of a device pattern in a set of patterns. |
DevicePattern.Builder |
setPosition(java.lang.String position)
Sets the position of a device pattern in a set of patterns. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DevicePattern.Builder()
| Method Detail |
|---|
@Nonnull public DevicePattern build()
DevicePattern and returns it.
DevicePattern
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if one of the needed arguments to build an instance of DevicePattern is invalid
net.sf.qualitycheck.exception.IllegalNullArgumentException - if one of the needed arguments to build an instance of DevicePattern is invalid
@Nonnull
public DevicePattern.Builder setId(@Nonnegative
int id)
id - identification number
Builder, for chaining
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if the given integer is smaller than 0
@Nonnull
public DevicePattern.Builder setId(@Nonnull
java.lang.String id)
String is parsed as a decimal
number.
id - ID of a device pattern as string
Builder, for chaining
net.sf.qualitycheck.exception.IllegalNullArgumentException - if the given argument is null
java.lang.NumberFormatException - if the given string is not parsable as integer
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if the parsed integer is smaller than 0
@Nonnull
public DevicePattern.Builder setPattern(@Nonnull
java.util.regex.Pattern pattern)
pattern - compiled representation of a regular expression
Builder, for chaining
@Nonnull
public DevicePattern.Builder setPerlRegularExpression(@Nonnull
java.lang.String regex)
Builder.
regex - PERL style regular expression to be converted
Builder, for chaining
@Nonnull
public DevicePattern.Builder setPosition(@Nonnegative
int position)
position - position of a device pattern
Builder, for chaining
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if the given integer is smaller than 0
@Nonnull
public DevicePattern.Builder setPosition(@Nonnull
java.lang.String position)
String is parsed as a decimal
number.
position - position of a device pattern as string
Builder, for chaining
net.sf.qualitycheck.exception.IllegalNullArgumentException - if the given argument is null
java.lang.NumberFormatException - if the given string is not parsable as integer
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if the parsed integer is smaller than 0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||