All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.xmp.schema.model.rules.RealRule Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
// Copyright 2011 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================

package com.adobe.xmp.schema.model.rules;

import com.adobe.xmp.schema.model.SchemaVisitor;
import com.adobe.xmp.schema.model.TypeRule;
import com.adobe.xmp.schema.model.XMPSchemaException;


/**
 * This rule is a comparison of a Real property with a constant argument.
 * 
 * @author Stefan Makswit
 */
public class RealRule implements TypeRule
{
	private static final long serialVersionUID = 1L;
	/** operator used to compare the operand with the actual XMP value */
	private ComparisonOperator operator;
	/** a double, corresponds with XMP type Real */
	private double operand;

	
	/**
	 * Constructs a new RealRule.
	 *
	 * @param operator the comparison operator
	 * @param operand the double value to compare with
	 */
	public RealRule(ComparisonOperator operator, double operand)
	{
		this.operator = operator;
		this.operand = operand;
	}


	/**
	 * @return Returns the operator.
	 */
	public ComparisonOperator getOperator()
	{
		return this.operator;
	}


	/**
	 * @return Returns the operand.
	 */
	public double getOperand()
	{
		return this.operand;
	}
	
	
	/**
	 * @see com.adobe.xmp.schema.model.TypeRule#accept(com.adobe.xmp.schema.model.SchemaVisitor)
	 */
	public void accept(SchemaVisitor schemaVisitor) throws XMPSchemaException
	{
		schemaVisitor.visit(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy