aboutsummaryrefslogtreecommitdiffstats
path: root/model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/DataRepresentation.java
blob: fd48eb949db362186a7ce6283254c7874a5773e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package org.eclipse.viatra.solver.data.model.representation;

import org.eclipse.viatra.solver.data.map.ContinousHashProvider;

public abstract class DataRepresentation<K, V> {
	protected final ContinousHashProvider<K> hashProvider;
	protected final V defaultValue;

	protected DataRepresentation(ContinousHashProvider<K> hashProvider,	V defaultValue) {
		this.hashProvider = hashProvider;
		this.defaultValue = defaultValue;
	}
	
	public abstract String getName();
	
	public ContinousHashProvider<K> getHashProvider() {
		return hashProvider;
	}
	public abstract boolean isValidKey(K key);

	public V getDefaultValue() {
		return defaultValue;
	}
}