com.formkiq.vision.pdf.parser.PdfToken Maven / Gradle / Ivy
/*
* Copyright (C) 2018 FormKiQ Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formkiq.vision.pdf.parser;
import java.util.List;
import java.util.stream.Collectors;
/**
* Holder class for {@link PdfTokenOperator} and {@link List} of
* {@link PdfTokenOperand}.
*
*/
public class PdfToken {
/** {@link PdfTokenOperator}. */
private PdfTokenOperator operator;
/** {@link List} of {@link PdfTokenOperand}. */
private List operands;
/**
* constructor.
*/
public PdfToken() {
}
/**
* constructor.
* @param op {@link PdfTokenOperator}
*/
public PdfToken(final PdfTokenOperator op) {
this();
this.operator = op;
}
/**
* @return {@link PdfTokenOperator}
*/
public PdfTokenOperator getOperator() {
return this.operator;
}
/**
* @param op {@link PdfTokenOperator}
*/
public void setOperator(final PdfTokenOperator op) {
this.operator = op;
}
/**
* @return {@link List} of {@link PdfTokenOperand}
*/
public List getOperands() {
return this.operands;
}
/**
* @param list {@link List} of {@link PdfTokenOperand}
*/
public void setOperands(final List list) {
this.operands = list;
}
@Override
public String toString() {
return this.operator + ": " + this.operands.stream()
.map(s -> s.toString()).collect(Collectors.joining(","));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy