/
NikolayIvkin
/
sqlancer2
Обзор
Документация
Войти
/
NikolayIvkin
/
sqlancer2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/sqlancer/postgres/PostgresCompoundDataType.java
45 строк
1 KB
Manuel Rigger
Enforce the checkstyle FinalClass rule
28 май 2020, 22:41
28 май 2020, 22:41
2cca29d
Код
Авторство
О чём код?
package sqlancer.postgres; import java.util.Optional; import sqlancer.postgres.PostgresSchema.PostgresDataType; public final class PostgresCompoundDataType { private final PostgresDataType dataType; private final PostgresCompoundDataType elemType; private final Integer size; private PostgresCompoundDataType(PostgresDataType dataType, PostgresCompoundDataType elemType, Integer size) { this.dataType = dataType; this.elemType = elemType; this.size = size; } public PostgresDataType getDataType() { return dataType; } public PostgresCompoundDataType getElemType() { if (elemType == null) { throw new AssertionError(); } return elemType; } public Optional<Integer> getSize() { if (size == null) { return Optional.empty(); } else { return Optional.of(size); } } public static PostgresCompoundDataType create(PostgresDataType type, int size) { return new PostgresCompoundDataType(type, null, size); } public static PostgresCompoundDataType create(PostgresDataType type) { return new PostgresCompoundDataType(type, null, null); } }