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

org.unlaxer.jaddress.entity.standard.Offset Maven / Gradle / Ivy

The newest version!
package org.unlaxer.jaddress.entity.standard;

import org.unlaxer.jaddress.parser.TopOrBottom;

public class Offset{
	
	final TopOrBottom from;
	// 0 origin
	final int value;
	public Offset(TopOrBottom from, int value) {
		super();
		this.from = from;
		this.value = value;
	}
	public TopOrBottom from() {
		return from;
	}
	public int value() {
		return value;
	}
	
	@Override
	public String toString() {
		return 
			from == TopOrBottom.TOP ?
				String.valueOf(value):
				String.valueOf(-value);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy