• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smartsheet / smartsheet-java-sdk / #43

24 Aug 2023 10:26PM UTC coverage: 50.427% (-0.02%) from 50.442%
#43

push

github-actions

web-flow
Fix Checkstyle violations in api/models Classes (#57)

This will fix ~900 violations

189 of 189 new or added lines in 59 files covered. (100.0%)

3423 of 6788 relevant lines covered (50.43%)

0.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

39.26
/src/main/java/com/smartsheet/api/models/Column.java
1
package com.smartsheet.api.models;
2

3
/*
4
 * #[license]
5
 * Smartsheet SDK for Java
6
 * %%
7
 * Copyright (C) 2023 Smartsheet
8
 * %%
9
 * Licensed under the Apache License, Version 2.0 (the "License");
10
 * you may not use this file except in compliance with the License.
11
 * You may obtain a copy of the License at
12
 *
13
 *      http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing, software
16
 * distributed under the License is distributed on an "AS IS" BASIS,
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
 * See the License for the specific language governing permissions and
19
 * limitations under the License.
20
 * %[license]
21
 */
22

23
import com.smartsheet.api.models.enums.ColumnTag;
24
import com.smartsheet.api.models.enums.ColumnType;
25
import com.smartsheet.api.models.enums.Symbol;
26
import com.smartsheet.api.models.enums.SystemColumnType;
27
import com.smartsheet.api.models.format.Format;
28

29
import java.util.List;
30

31
/**
32
 * Represents the Column object.
33
 */
34
public class Column extends IdentifiableModel<Long> {
35

36
    /**
37
     * Represents the system column type.
38
     */
39
    private SystemColumnType systemColumnType;
40

41
    /**
42
     * Represents the column type.
43
     */
44
    private ColumnType type;
45

46
    /**
47
     * Represents the format for the auto generated numbers (if the SystemColumnType is an AUTO_NUMBER).
48
     */
49
    private AutoNumberFormat autoNumberFormat;
50

51
    /**
52
     * List containing contact options
53
     */
54
    private List<Contact> contactOptions;
55

56
    /**
57
     * Column description
58
     */
59
    private String description;
60

61
    /**
62
     * Represents the {@link Format} for this column.
63
     */
64
    private Format format;
65

66
    /**
67
     * The formula for a column, if set, for instance '=data@row'.
68
     */
69
    private String formula;
70

71
    /**
72
     * Represents the hidden flag for the column.
73
     */
74
    private Boolean hidden;
75

76
    /**
77
     * Represents the position.
78
     */
79
    private Integer index;
80

81
    /**
82
     * Represents if the column is locked
83
     */
84
    private Boolean locked;
85

86
    /**
87
     * Represents if the column is locked for the user
88
     */
89
    private Boolean lockedForUser;
90

91
    /**
92
     * Represents the list of options for the column.
93
     */
94
    private List<String> options;
95

96
    /**
97
     * Represents the primary flag.
98
     */
99
    private Boolean primary;
100

101
    /**
102
     * Represents the symbol used for the column.
103
     */
104
    private Symbol symbol;
105

106
    /**
107
     * Represents the tags to indicate a special type of column.
108
     */
109
    private List<ColumnTag> tags;
110

111
    /**
112
     * Represents the title.
113
     */
114
    private String title;
115

116
    /**
117
     * Flag indicating whether validation has been enabled for the column
118
     */
119
    private Boolean validation;
120

121
    /**
122
     * Determines the compatibility level of this client, 0 for existing types, 1 for multi-assign,
123
     * greater than 1 for future types.
124
     */
125
    private Integer version;
126

127
    /**
128
     * The width of the cell.
129
     * */
130
    private Integer width;
131

132
    /**
133
     * Default constructor
134
     */
135
    public Column() {
1✔
136
    }
1✔
137

138
    /**
139
     * Construct a Column with specified id
140
     *
141
     * @param id Column id
142
     */
143
    public Column(Long id) {
×
144
        this.setId(id);
×
145
    }
×
146

147
    /**
148
     * Gets the system column type.
149
     *
150
     * @return the system column type
151
     */
152
    public SystemColumnType getSystemColumnType() {
153
        return systemColumnType;
1✔
154
    }
155

156
    /**
157
     * Sets the system column type.
158
     *
159
     * @param systemColumnType the new system column type
160
     */
161
    public Column setSystemColumnType(SystemColumnType systemColumnType) {
162
        this.systemColumnType = systemColumnType;
×
163
        return this;
×
164
    }
165

166
    /**
167
     * Gets the column type.
168
     *
169
     * @return the type
170
     */
171
    public ColumnType getType() {
172
        return type;
1✔
173
    }
174

175
    /**
176
     * Sets the column type.
177
     *
178
     * @param type the new type
179
     */
180
    public Column setType(ColumnType type) {
181
        this.type = type;
1✔
182
        return this;
1✔
183
    }
184

185
    /**
186
     * Gets the format for the auto generated numbers.
187
     *
188
     * @return the auto number format
189
     */
190
    public AutoNumberFormat getAutoNumberFormat() {
191
        return autoNumberFormat;
1✔
192
    }
193

194
    /**
195
     * Sets the format for the auto generated numbers.
196
     *
197
     * @param autoNumberFormat the new auto number format
198
     */
199
    public Column setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
200
        this.autoNumberFormat = autoNumberFormat;
×
201
        return this;
×
202
    }
203

204
    /**
205
     * Gets a list of contact options
206
     *
207
     * @return list of contact options
208
     */
209
    public List<Contact> getContactOptions() {
210
        return contactOptions;
1✔
211
    }
212

213
    /**
214
     * Sets the list of contact options
215
     *
216
     * @param contactOptions the new list of contact options
217
     * @return Column
218
     */
219
    public Column setContactOptions(List<Contact> contactOptions) {
220
        this.contactOptions = contactOptions;
×
221
        return this;
×
222
    }
223

224
    /**
225
     * Gets the column description
226
     *
227
     * @return the column description
228
     */
229
    public String getDescription() {
230
        return description;
1✔
231
    }
232

233
    /**
234
     * Sets the column description
235
     */
236
    public Column setDescription(String description) {
237
        this.description = description;
×
238
        return this;
×
239
    }
240

241
    /**
242
     * @return the {@link Format}
243
     */
244
    public Format getFormat() {
245
        return format;
1✔
246
    }
247

248
    /**
249
     * @param format the {@link Format} to set
250
     */
251
    public Column setFormat(Format format) {
252
        this.format = format;
1✔
253
        return this;
1✔
254
    }
255

256
    /**
257
     *
258
     * @return the column formula
259
     */
260
    public String getFormula() {
261
        return formula;
1✔
262
    }
263

264
    /**
265
     * @param formula the column formula
266
     */
267
    public Column setFormula(String formula) {
268
        this.formula = formula;
×
269
        return this;
×
270
    }
271

272
    /**
273
     * Gets the hidden flag.
274
     *
275
     * @return the hidden flag
276
     */
277
    public Boolean getHidden() {
278
        return hidden;
1✔
279
    }
280

281
    /**
282
     * Sets the hidden flag.
283
     *
284
     * @param hidden the new hidden flag
285
     */
286
    public Column setHidden(Boolean hidden) {
287
        this.hidden = hidden;
×
288
        return this;
×
289
    }
290

291
    /**
292
     * Gets the position of the column.
293
     *
294
     * @return the index
295
     */
296
    public Integer getIndex() {
297
        return index;
1✔
298
    }
299

300
    /**
301
     * Sets the position of the column.
302
     *
303
     * @param index the new index
304
     */
305
    public Column setIndex(Integer index) {
306
        this.index = index;
1✔
307
        return this;
1✔
308
    }
309

310
    /**
311
     * Gets the locked flag
312
     * @return the locked flag
313
     */
314
    public Boolean isLocked() {
315
        return locked;
1✔
316
    }
317

318
    /**
319
     * Sets the locked flag
320
     * @param locked the locked flag
321
     */
322
    public Column setLocked(Boolean locked) {
323
        this.locked = locked;
1✔
324
        return this;
1✔
325
    }
326

327
    /**
328
     * Gets the locked for user flag
329
     * @return the locked for user flag
330
     */
331
    public Boolean isLockedForUser() {
332
        return lockedForUser;
1✔
333
    }
334

335
    /**
336
     * Sets the locked for user flag
337
     * @param lockedForUser the locked for user flag
338
     */
339
    public Column setLockedForUser(Boolean lockedForUser) {
340
        this.lockedForUser = lockedForUser;
1✔
341
        return this;
1✔
342
    }
343

344
    /**
345
     * Gets the list of options for the column.
346
     *
347
     * @return the options
348
     */
349
    public List<String> getOptions() {
350
        return options;
1✔
351
    }
352

353
    /**
354
     * Sets the list of options for the column.
355
     *
356
     * @param options the new options
357
     */
358
    public Column setOptions(List<String> options) {
359
        this.options = options;
1✔
360
        return this;
1✔
361
    }
362

363
    /**
364
     * Gets the primary flag for the column.
365
     *
366
     * @return the primary flag
367
     */
368
    public Boolean getPrimary() {
369
        return primary;
1✔
370
    }
371

372
    /**
373
     * Sets the primary flag for the column.
374
     *
375
     * @param primary the new primary flag
376
     */
377
    public Column setPrimary(Boolean primary) {
378
        this.primary = primary;
1✔
379
        return this;
1✔
380
    }
381

382
    /**
383
     * Gets the symbol for the column.
384
     *
385
     * @return the symbol
386
     */
387
    public Symbol getSymbol() {
388
        return symbol;
1✔
389
    }
390

391
    /**
392
     * Sets the symbol for the column.
393
     *
394
     * @param symbol the new symbol
395
     */
396
    public Column setSymbol(Symbol symbol) {
397
        this.symbol = symbol;
1✔
398
        return this;
1✔
399
    }
400

401
    /**
402
     * Gets the tags that indicate a special type of column.
403
     *
404
     * @return the tags
405
     */
406
    public List<ColumnTag> getTags() {
407
        return tags;
1✔
408
    }
409

410
    /**
411
     * Sets the tags to indicate a special type of column.
412
     *
413
     * @param tags the new tags
414
     */
415
    public Column setTags(List<ColumnTag> tags) {
416
        this.tags = tags;
1✔
417
        return this;
1✔
418
    }
419

420
    /**
421
     * Gets the title for the column.
422
     *
423
     * @return the title
424
     */
425
    public String getTitle() {
426
        return title;
1✔
427
    }
428

429
    /**
430
     * Sets the title for the column.
431
     *
432
     * @param title the new title
433
     */
434
    public Column setTitle(String title) {
435
        this.title = title;
1✔
436
        return this;
1✔
437
    }
438

439
    /**
440
     * Gets the value of the validation flag
441
     * @return the validation flag
442
     */
443
    public Boolean getValidation() {
444
        return validation;
1✔
445
    }
446

447
    /**
448
     * Sets the value of the validation flag
449
     * @return the Column
450
     */
451
    public Column setValidation(Boolean validation) {
452
        this.validation = validation;
×
453
        return this;
×
454
    }
455

456
    /**
457
     * Gets the column compatibility version
458
     * @return version 0 for existing types, 1 for multi-assign, greater than 1 for future types.
459
     */
460
    public Integer getVersion() {
461
        return version;
1✔
462
    }
463

464
    /**
465
     * Sets the column compatibility version
466
     * @param version 0 for existing types, 1 for multi-assign, greater than 1 for future types.
467
     * @return the Column
468
     */
469
    public Column setVersion(Integer version) {
470
        this.version = version;
×
471
        return this;
×
472
    }
473

474
    /**
475
     * Gets the width
476
     * @return the width
477
     */
478
    public Integer getWidth() {
479
        return width;
1✔
480
    }
481

482
    /**
483
     * Sets the width
484
     * @param width the width
485
     */
486
    public Column setWidth(Integer width) {
487
        this.width = width;
1✔
488
        return this;
1✔
489
    }
490

491
    /**
492
     * A convenience class to help create a column object with the appropriate fields for adding to a sheet.
493
     */
494
    public static class AddColumnToSheetBuilder {
1✔
495
        /** The title. */
496
        private String title;
497

498
        /** The index **/
499
        private Integer index;
500

501
        /** The type. */
502
        private ColumnType type;
503

504
        /** The options. */
505
        private List<String> options;
506

507
        /** The symbol. */
508
        private Symbol symbol;
509

510
        /** The system column type. */
511
        private SystemColumnType systemColumnType;
512

513
        /** The auto number format. */
514
        private AutoNumberFormat autoNumberFormat;
515

516
        /** The column width. */
517
        private Integer width;
518

519
        /**Represents the primary flag.*/
520
        private Boolean primary;
521

522
        /** The column format */
523
        private Format format;
524

525
        /** Flag indicating whether validation has been enabled for the column */
526
        private Boolean validation;
527

528
        /**
529
         * Gets the width for the column.
530
         *
531
         * @return the width
532
         */
533
        public Integer getWidth() {
534
            return width;
×
535
        }
536

537
        /**
538
         * Sets the width for the column.
539
         *
540
         * @param width the width
541
         * @return the column to sheet builder
542
         */
543
        public AddColumnToSheetBuilder setWidth(Integer width) {
544
            this.width = width;
×
545
            return this;
×
546
        }
547

548
        /**
549
         * Gets the primary status for the column.
550
         *
551
         * @return the boolean primary
552
         */
553
        public Boolean getPrimary() {
554
            return primary;
×
555
        }
556

557
        /**
558
         * Sets the primary status for the column.
559
         *
560
         * @param primary the boolean primary
561
         * @return the column to sheet builder
562
         */
563
        public AddColumnToSheetBuilder setPrimary(Boolean primary) {
564
            this.primary = primary;
1✔
565
            return this;
1✔
566
        }
567

568
        /**
569
         * Sets the title for the column.
570
         *
571
         * @param title the title
572
         * @return the add the column to sheet builder
573
         */
574
        public AddColumnToSheetBuilder setTitle(String title) {
575
            this.title = title;
1✔
576
            return this;
1✔
577
        }
578

579
        /**
580
         * Gets the title.
581
         * @return the title
582
         */
583
        public String getTitle() {
584
            return title;
×
585
        }
586

587
        /**
588
         * Sets the type for the column.
589
         *
590
         * @param type the type
591
         * @return the adds the column to sheet builder
592
         */
593
        public AddColumnToSheetBuilder setType(ColumnType type) {
594
            this.type = type;
1✔
595
            return this;
1✔
596
        }
597

598
        /**
599
         * Gets the type for the column.
600
         * @return the type
601
         */
602
        public ColumnType getType() {
603
            return type;
×
604
        }
605

606
        /**
607
         * Sets the options for the column.
608
         *
609
         * @param options the options
610
         * @return the adds the column to sheet builder
611
         */
612
        public AddColumnToSheetBuilder setOptions(List<String> options) {
613
            this.options = options;
×
614
            return this;
×
615
        }
616

617
        /**
618
         * Gets the option for the column.
619
         * @return the option
620
         */
621
        public List<String> getOptions() {
622
            return options;
×
623
        }
624

625
        /**
626
         * Sets the symbol for the column.
627
         *
628
         * @param symbol the symbol
629
         * @return the adds the column to sheet builder
630
         */
631
        public AddColumnToSheetBuilder setSymbol(Symbol symbol) {
632
            this.symbol = symbol;
×
633
            return this;
×
634
        }
635

636
        /**
637
         * Gets the symbol for the column.
638
         * @return the symbol
639
         */
640
        public Symbol getSymbol() {
641
            return symbol;
×
642
        }
643

644
        /**
645
         * Sets the system column type.
646
         *
647
         * @param systemColumnType the system column type
648
         * @return the adds the column to sheet builder
649
         */
650
        public AddColumnToSheetBuilder setSystemColumnType(SystemColumnType systemColumnType) {
651
            this.systemColumnType = systemColumnType;
×
652
            return this;
×
653
        }
654

655
        /**
656
         * Gets the system column type.
657
         * @return the system column type
658
         */
659
        public SystemColumnType getSystemColumnType() {
660
            return systemColumnType;
×
661
        }
662

663
        /**
664
         * Sets the format for an auto number column.
665
         *
666
         * @param autoNumberFormat the auto number format
667
         * @return the adds the column to sheet builder
668
         */
669
        public AddColumnToSheetBuilder setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
670
            this.autoNumberFormat = autoNumberFormat;
×
671
            return this;
×
672
        }
673

674
        /**
675
         * Gets the format for an auto number column.
676
         * @return the format for an auto number column
677
         */
678
        public AutoNumberFormat getAutoNumberFormat() {
679
            return autoNumberFormat;
×
680
        }
681

682
        /**
683
         * Gets the index specified for the new column.
684
         * @return the index
685
         */
686
        public Integer getIndex() {
687
            return index;
×
688
        }
689

690
        /**
691
         * Sets the index for the column. Set this to any value greater than the index of
692
         * the last column to add it as the last column.
693
         *
694
         * @param index the index
695
         * @return the index
696
         */
697
        public AddColumnToSheetBuilder setIndex(Integer index) {
698
            this.index = index;
×
699
            return this;
×
700
        }
701

702
        /**
703
         * Gets the format for a column.
704
         * @return the format for a column
705
         */
706
        public Format getFormat() {
707
            return format;
×
708
        }
709

710
        /**
711
         * Sets the format for a column.
712
         * @param format the format.
713
         * @return the AddColumnToSheetBuilder.
714
         */
715
        public AddColumnToSheetBuilder setFormat(Format format) {
716
            this.format = format;
×
717
            return this;
×
718
        }
719

720
        /**
721
         * Gets the value of the validation flag
722
         */
723
        public Boolean getValidation() {
724
            return validation;
×
725
        }
726

727
        /**
728
         * Sets the value of the validation flag
729
         * @return the AddColumn builder
730
         */
731
        public AddColumnToSheetBuilder setValidation(Boolean validation) {
732
            this.validation = validation;
×
733
            return this;
×
734
        }
735

736
        /**
737
         * Builds the column.
738
         *
739
         * @return the column
740
         */
741
        public Column build() {
742
            if (title == null || type == null) {
1✔
743
                throw new InstantiationError();
×
744
            }
745

746
            Column column = new Column();
1✔
747
            column.title = title;
1✔
748
            column.type = type;
1✔
749
            column.options = options;
1✔
750
            column.symbol = symbol;
1✔
751
            column.index = index;
1✔
752
            column.width = width;
1✔
753
            column.systemColumnType = systemColumnType;
1✔
754
            column.autoNumberFormat = autoNumberFormat;
1✔
755
            column.primary = primary;
1✔
756
            column.format = format;
1✔
757
            column.validation = validation;
1✔
758
            return column;
1✔
759
        }
760

761
    }
762

763
    /**
764
     * The Class UpdateColumnBuilder.
765
     */
766
    public static class UpdateColumnBuilder {
×
767
        /** The position of the column. */
768
        private int index;
769

770
        /** The title for the column. */
771
        private String title;
772

773
        /** The type of the column. */
774
        private ColumnType type;
775

776
        /** The options for the column. */
777
        private List<String> options;
778

779
        /** The symbol for the column. */
780
        private Symbol symbol;
781

782
        /** The system column type. */
783
        private SystemColumnType systemColumnType;
784

785
        /** The format for an auto number column. */
786
        private AutoNumberFormat autoNumberFormat;
787

788
        /** The sheet id. */
789
        private Long sheetId;
790

791
        /** The width */
792
        private Integer width;
793

794
        /** The format */
795
        private Format format;
796

797
        /** The column id */
798
        private Long id;
799

800
        /** Flag indicating whether validation has been enabled for the column */
801
        private Boolean validation;
802

803
        /**
804
         * Gets the column id.
805
         *
806
         * @return the column id
807
         */
808
        public Long getColumnId() {
809
            return id;
×
810
        }
811

812
        /**
813
         * Sets the position for the column.
814
         *
815
         * @param columnId the columnId
816
         * @return the modify column builder
817
         */
818
        public UpdateColumnBuilder setColumnId(Long columnId) {
819
            this.id = columnId;
×
820
            return this;
×
821
        }
822

823
        /**
824
         * Sets the position for the column.
825
         *
826
         * @param index the position
827
         * @return the modify column builder
828
         */
829
        public UpdateColumnBuilder setIndex(int index) {
830
            this.index = index;
×
831
            return this;
×
832
        }
833

834
        /**
835
         * Sets the title for the column.
836
         *
837
         * @param title the title
838
         * @return the modify column builder
839
         */
840
        public UpdateColumnBuilder setTitle(String title) {
841
            this.title = title;
×
842
            return this;
×
843
        }
844

845
        /**
846
         * Sets the type for the column.
847
         *
848
         * @param type the type
849
         * @return the modify column builder
850
         */
851
        public UpdateColumnBuilder setType(ColumnType type) {
852
            this.type = type;
×
853
            return this;
×
854
        }
855

856
        /**
857
         * Sets the options for the column.
858
         *
859
         * @param options the options
860
         * @return the modify column builder
861
         */
862
        public UpdateColumnBuilder setOptions(List<String> options) {
863
            this.options = options;
×
864
            return this;
×
865
        }
866

867
        /**
868
         * Sets the symbol for the column.
869
         *
870
         * @param symbol the symbol
871
         * @return the modify column builder
872
         */
873
        public UpdateColumnBuilder setSymbol(Symbol symbol) {
874
            this.symbol = symbol;
×
875
            return this;
×
876
        }
877

878
        /**
879
         * Sets the system column type for the column.
880
         *
881
         * @param systemColumnType the system column type
882
         * @return the modify column builder
883
         */
884
        public UpdateColumnBuilder setSystemColumnType(SystemColumnType systemColumnType) {
885
            this.systemColumnType = systemColumnType;
×
886
            return this;
×
887
        }
888

889
        /**
890
         * Sets the format for an auto number column.
891
         *
892
         * @param autoNumberFormat the auto number format
893
         * @return the modify column builder
894
         */
895
        public UpdateColumnBuilder setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
896
            this.autoNumberFormat = autoNumberFormat;
×
897
            return this;
×
898
        }
899

900
        /**
901
         * Sets the sheet id.
902
         *
903
         * @param sheetId the sheet id
904
         * @return the modify column builder
905
         */
906
        public UpdateColumnBuilder setSheetId(Long sheetId) {
907
            this.sheetId = sheetId;
×
908
            return this;
×
909
        }
910

911
        /**
912
         * Sets the format
913
         * @param format the format
914
         * @return the modify column builder
915
         */
916
        public UpdateColumnBuilder setFormat(Format format) {
917
            this.format = format;
×
918
            return this;
×
919
        }
920

921
        /**
922
         * Sets the width
923
         * @param width the width
924
         * @return the modify column builder
925
         */
926
        public UpdateColumnBuilder setWidth(Integer width) {
927
            this.width = width;
×
928
            return this;
×
929
        }
930

931
        /**
932
         * Sets the value of the validation flag
933
         * @return the modify column builder
934
         */
935
        public UpdateColumnBuilder setValidation(Boolean validation) {
936
            this.validation = validation;
×
937
            return this;
×
938
        }
939

940
        /**
941
         * Gets the index.
942
         *
943
         * @return the index
944
         */
945
        public int getIndex() {
946
            return index;
×
947
        }
948

949
        /**
950
         * Gets the title.
951
         *
952
         * @return the title
953
         */
954
        public String getTitle() {
955
            return title;
×
956
        }
957

958
        /**
959
         * Gets the type.
960
         *
961
         * @return the type
962
         */
963
        public ColumnType getType() {
964
            return type;
×
965
        }
966

967
        /**
968
         * Gets the options.
969
         *
970
         * @return the options
971
         */
972
        public List<String> getOptions() {
973
            return options;
×
974
        }
975

976
        /**
977
         * Gets the symbol.
978
         *
979
         * @return the symbol
980
         */
981
        public Symbol getSymbol() {
982
            return symbol;
×
983
        }
984

985
        /**
986
         * Gets the system column type.
987
         *
988
         * @return the system column type
989
         */
990
        public SystemColumnType getSystemColumnType() {
991
            return systemColumnType;
×
992
        }
993

994
        /**
995
         * Gets the auto number format.
996
         *
997
         * @return the auto number format
998
         */
999
        public AutoNumberFormat getAutoNumberFormat() {
1000
            return autoNumberFormat;
×
1001
        }
1002

1003
        /**
1004
         * Gets the sheet id.
1005
         *
1006
         * @return the sheet id
1007
         */
1008
        public Long getSheetId() {
1009
            return sheetId;
×
1010
        }
1011

1012
        /**
1013
         * Gets the width
1014
         * @return the width
1015
         */
1016
        public Integer getWidth() {
1017
            return width;
×
1018
        }
1019

1020
        /**
1021
         * Gets the format
1022
         * @return the format
1023
         */
1024
        public Format getFormat() {
1025
            return format;
×
1026
        }
1027

1028
        /**
1029
         * Gets the value of the validation flag
1030
         * @return the validation flag
1031
         */
1032
        public Boolean getValidation() {
1033
            return validation;
×
1034
        }
1035

1036
        /**
1037
         * Builds the column.
1038
         *
1039
         * @return the column
1040
         */
1041
        public Column build() {
1042
            if (title == null || id == null) {
×
1043
                throw new InstantiationError("A title and a column id are required");
×
1044
            }
1045

1046
            Column column = new Column();
×
1047
            column.index = index;
×
1048
            column.title = title;
×
1049
            column.type = type;
×
1050
            column.options = options;
×
1051
            column.symbol = symbol;
×
1052
            column.systemColumnType = systemColumnType;
×
1053
            column.autoNumberFormat = autoNumberFormat;
×
1054
            column.width = width;
×
1055
            column.format = format;
×
1056
            column.validation = validation;
×
1057
            column.setId(id);
×
1058
            return column;
×
1059
        }
1060
    }
1061
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc