1// BEGIN LICENSE BLOCK
2// Version: CMPL 1.1
3//
4// The contents of this file are subject to the Cisco-style Mozilla Public
5// License Version 1.1 (the "License"); you may not use this file except
6// in compliance with the License.  You may obtain a copy of the License
7// at www.eclipse-clp.org/license.
8//
9// Software distributed under the License is distributed on an "AS IS"
10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
11// the License for the specific language governing rights and limitations
12// under the License.
13//
14// The Original Code is  CPViz Constraint Visualization System
15// The Initial Developer of the Original Code is  Helmut Simonis
16// Portions created by the Initial Developer are
17// Copyright (C) 2009-2010 Helmut Simonis
18//
19// Contributor(s): 	Helmut Simonis, 4C, Univerity College Cork, Cork
20//
21//
22// END LICENSE BLOCK
23// ----------------------------------------------------------------------
24package ie.ucc.cccc.viz;
25
26
27/**
28 * Holds information about integer values in visualizers
29 * @author hsimonis
30 *
31 */
32public class VizInteger extends VizEntry {
33	private int value;
34
35	@Override public String toString() {
36		return "IntVar "+index+" value "+value;
37	}
38
39	/**
40	 * Create a placeholder for an integer in a visualizer
41	 * @param index String, encodes the position in the visualizer
42	 * @param value int, the value of the integer variable
43	 */
44	public VizInteger(String index,int value){
45		this.index = index;
46		this.value = value;
47	}
48
49	/**
50	 * create a list of one element as a domain
51	 */
52	public FullDomain getDomainAsList(){
53		FullDomain list = new FullDomain();
54		list.add(value);
55		return list;
56	}
57}
58