public class StringMetaData extends Object implements ColumnMetaData
Constructor and Description |
---|
StringMetaData()
Default constructor with no restrictions on allowable strings
|
StringMetaData(String mustMatchRegex,
Integer minLength,
Integer maxLength) |
Modifier and Type | Method and Description |
---|---|
StringMetaData |
clone() |
ColumnType |
getColumnType()
Get the type of column
|
boolean |
isValid(Writable writable)
Is the given Writable valid for this column, given the column type and any restrictions given by the
ColumnMetaData object?
|
String |
toString() |
public StringMetaData()
public StringMetaData(String mustMatchRegex, Integer minLength, Integer maxLength)
mustMatchRegex
- Nullable. If not null: this is a regex that each string must match in order for the entry
to be considered valid.minLength
- Min allowable String length. If null: no restriction on min String lengthmaxLength
- Max allowable String length. If null: no restriction on max String lengthpublic ColumnType getColumnType()
ColumnMetaData
getColumnType
in interface ColumnMetaData
public boolean isValid(Writable writable)
ColumnMetaData
isValid
in interface ColumnMetaData
writable
- Writable to checkpublic StringMetaData clone()
clone
in interface ColumnMetaData
clone
in class Object
Copyright © 2016. All rights reserved.