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

com.mindoo.domino.jna.constants.ScheduleOptions Maven / Gradle / Ivy

There is a newer version: 0.9.53
Show newest version
package com.mindoo.domino.jna.constants;

import java.util.EnumSet;

/**
 * Schedule Query APIs
 * 
 * @author Karsten Lehmann
 */
public enum ScheduleOptions {
	
	/** Return composite sched */
	COMPOSITE(0x0001),
	
	/** Return each person's sched */
	EACHPERSON(0x0002),
	
	/** Do only local lookup */
	LOCAL(0x0004),
	
	/** force remote even if you are using workstation based email */
	FORCEREMOTE(0x0020);
	
	private int m_val;
	
	ScheduleOptions(int val) {
		m_val = val;
	}
	
	public int getValue() {
		return m_val;
	}
	
	public static short toBitMask(EnumSet findSet) {
		int result = 0;
		if (findSet!=null) {
			for (ScheduleOptions currFind : values()) {
				if (findSet.contains(currFind)) {
					result = result | currFind.getValue();
				}
			}
		}
		return (short) (result & 0xffff);
	}
	
	public static int toBitMaskInt(EnumSet findSet) {
		int result = 0;
		if (findSet!=null) {
			for (ScheduleOptions currFind : values()) {
				if (findSet.contains(currFind)) {
					result = result | currFind.getValue();
				}
			}
		}
		return result;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy