01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10: //
11: //
12:
13: package de.uka.ilkd.key.logic.sort;
14:
15: import de.uka.ilkd.key.logic.Name;
16:
17: public abstract class AbstractCollectionSort extends AbstractSort
18: implements CollectionSort {
19:
20: final Sort elementSort;
21:
22: /** creates a Sort (with a new equality symbol for this sort) */
23: public AbstractCollectionSort(String name, Sort elemSort) {
24: super (new Name(name));
25: elementSort = elemSort;
26: }
27:
28: public Sort elementSort() {
29: return elementSort;
30: }
31:
32: /**
33: * @return an object of this class with elementSort().equals(p),
34: * or null if such an object cannot be constructed (as p is an
35: * incompatible sort)
36: */
37: public Sort cloneFor(Sort p) {
38: throw new RuntimeException("Method has not been written");
39: }
40:
41: /**
42: * @return the sorts of the predecessors of this sort
43: */
44: public SetOfSort extendsSorts() {
45: return SetAsListOfSort.EMPTY_SET;
46: }
47: }
|