1 /*
2 * Prometheus: Application Framework
3 * Copyright 2012-2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17 package io.github.tonywasher.joceanus.prometheus.service.sheet;
18
19 /**
20 * Class representing position of a cell within a sheet.
21 */
22 public class PrometheusSheetCellPosition {
23 /**
24 * Column index.
25 */
26 private final int theColumn;
27
28 /**
29 * Row index.
30 */
31 private final int theRow;
32
33 /**
34 * Constructor.
35 *
36 * @param pColumnIndex the column index
37 * @param pRowIndex the row index
38 */
39 public PrometheusSheetCellPosition(final int pColumnIndex,
40 final int pRowIndex) {
41 /* Store values */
42 theColumn = pColumnIndex;
43 theRow = pRowIndex;
44 }
45
46 /**
47 * Constructor.
48 *
49 * @param pSource the source position
50 */
51 public PrometheusSheetCellPosition(final PrometheusSheetCellPosition pSource) {
52 /* Store values */
53 theColumn = pSource.getColumnIndex();
54 theRow = pSource.getRowIndex();
55 }
56
57 /**
58 * Obtain Column index.
59 *
60 * @return the column index
61 */
62 public int getColumnIndex() {
63 return theColumn;
64 }
65
66 /**
67 * Obtain Row index.
68 *
69 * @return the row index
70 */
71 public int getRowIndex() {
72 return theRow;
73 }
74 }