aboutsummaryrefslogtreecommitdiffstats
path: root/Java/com/phidgets/IRLearnedCode.java
blob: c9c9765b376fc54f0afd958f0f28adf1598cce7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * Copyright 2012 Phidgets Inc.  All rights reserved.
 */

package com.phidgets;
/**
 * This class represents an IR Learned Code. This is used in the Learn event.
 *
 * @author Phidget Inc.
 */
public final class IRLearnedCode
{
	private IRCode code;
	private IRCodeInfo codeInfo;
	
	/**
	* Creates a new IR Learned Code. This is used in the Learn event.
	* @param code the IR code
	* @param codeInfo the code parameters
	*/
	public IRLearnedCode(IRCode code, IRCodeInfo codeInfo)
	{
		this.code=code;
		this.codeInfo=codeInfo;
	}
	
	/**
	 * Returns the code.
	 * @return code
	 */
	public IRCode getCode()
	{
		return code;
	}

	/**
	 * Returns the code parameters.
	 * @return code parameters
	 */
	public IRCodeInfo getCodeInfo()
	{
		return codeInfo;
	}
	
	public String toString()
	{
		return code.toString() + " (" + code.getBitCount() + "-bit)\n" + codeInfo.toString();
	}
}