public class StringMetaData extends BaseColumnMetaData
name
Constructor and Description |
---|
StringMetaData() |
StringMetaData(String name)
Default constructor with no restrictions on allowable strings
|
StringMetaData(String name,
String mustMatchRegex,
Integer minLength,
Integer maxLength) |
Modifier and Type | Method and Description |
---|---|
StringMetaData |
clone() |
ColumnType |
getColumnType()
Get the type of column
|
boolean |
isValid(Object input)
Is the given object valid for this column,
given the column type and any
restrictions given by the
ColumnMetaData object?
|
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() |
getName, setName
public StringMetaData()
public StringMetaData(String name)
public StringMetaData(String name, 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
public boolean isValid(Writable writable)
ColumnMetaData
writable
- Writable to checkpublic boolean isValid(Object input)
input
- object to checkpublic StringMetaData clone()
clone
in interface ColumnMetaData
clone
in class BaseColumnMetaData
Copyright © 2020. All rights reserved.