2 * Copyright © 2020 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.pce.model;
11 public class SpectrumAssignment {
13 * Begin index for available spectrum assignment.
18 * End index for available spectrum assignment.
23 * True if spectrum assignement is for flexible grid, false otherwise (1.2.1 device).
27 public SpectrumAssignment(int beginIndex, int stopIndex) {
29 this.beginIndex = beginIndex;
30 this.stopIndex = stopIndex;
34 * Return the begin index of spectrum assignment.
35 * @return the beginIndex
37 public int getBeginIndex() {
42 * Set the begin index of spectrum assignment.
43 * @param beginIndex the beginIndex to set
45 public void setBeginIndex(int beginIndex) {
46 this.beginIndex = beginIndex;
50 * Return the end index of spectrum assignment.
51 * @return the stopIndex
53 public int getStopIndex() {
58 * Set the stop index of spectrum assignment.
59 * @param stopIndex the stopIndex to set
61 public void setStopIndex(int stopIndex) {
62 this.stopIndex = stopIndex;
66 * True if flexgrid false otherwise.
67 * @return the flexGrid
69 public boolean isFlexGrid() {
74 * Set it to true for flexgrid, false otherwise.
75 * @param flexGrid the flexGrid to set
77 public void setFlexGrid(boolean flexGrid) {
78 this.flexGrid = flexGrid;
84 * @see java.lang.Object#toString()
87 public String toString() {
88 StringBuilder builder = new StringBuilder();
89 builder.append("SpectrumAssignment [beginIndex=").append(beginIndex).append(", stopIndex=").append(stopIndex)
90 .append(", flexGrid=").append(flexGrid).append("]");
91 return builder.toString();