|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.panels.userinput.field.rule.FieldSpec
public class FieldSpec
Rule field specification.
| Nested Class Summary | |
|---|---|
static class |
FieldSpec.Type
Field type. |
| Constructor Summary | |
|---|---|
FieldSpec(FieldSpec.Type type,
int columns,
int length)
Creates a FieldSpec. |
|
FieldSpec(String spec)
Constructs a FieldSpec. |
|
| Method Summary | |
|---|---|
int |
getColumns()
Returns the number to columns to display. |
int |
getLength()
Returns the maximum size of the field. |
FieldSpec.Type |
getType()
Returns the field type. |
boolean |
isUnlimitedLength()
Determines if the field has unlimited length. |
static FieldSpec |
parse(String spec)
Parses a field specification. |
boolean |
validate(String value)
Validates a value against the field specification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldSpec(String spec)
FieldSpec.
spec - the field spec
public FieldSpec(FieldSpec.Type type,
int columns,
int length)
FieldSpec.
type - the field typecolumns - the number of columns to display.length - the length of the field, or -1 if its unlimited| Method Detail |
|---|
public static FieldSpec parse(String spec)
spec - the field specification
null if the spec is not a valid field specificationpublic FieldSpec.Type getType()
public int getColumns()
public int getLength()
-1 if it is unlimitedpublic boolean isUnlimitedLength()
true if the field has unlimited length, false if it is limited by getLength()public boolean validate(String value)
value - the value to validate
true if the value is valid, otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||