KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > jrexx > set > ISet_char


1 /*
2 * 01/07/2003 - 15:19:32
3 *
4 * ISet_char.java -
5 * Copyright (C) 2003 Buero fuer Softwarearchitektur GbR
6 * ralf.meyer@karneim.com
7 * http://jrexx.sf.net
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */

23 package com.tc.jrexx.set;
24
25 import java.io.Serializable JavaDoc;
26
27 public interface ISet_char extends Serializable JavaDoc,Cloneable JavaDoc {
28
29   public interface Iterator {
30     public boolean hasNext();
31     public char next();
32   }
33
34   public boolean contains(char ch);
35   public boolean isEmpty();
36   public int size();
37   public ISet_char.Iterator iterator();
38
39
40 // public ISet_char getComplement();
41

42   /**
43    * return this.addAll(set).
44    * return C = A | B = this | set
45    */

46 // public ISet_char getUnionSet(ISet_char set);
47

48   /**
49    * return this.retainAll(set).
50    * return C = A & B = this & set
51    */

52 // public ISet_char getIntersectionSet(ISet_char set);
53

54   /**
55    * return this.removeAll(set).
56    * return C = A \ B = this \ set
57    */

58 // public ISet_char getDifferenceSet(ISet_char set);
59

60
61
62   public void clear();
63
64   public boolean add(char ch);
65   public boolean remove(char ch);
66
67   public void complement();
68
69   public void addAll(String JavaDoc chars);
70
71   /**
72    * adds all chars from set to this ISet_char without adding doublicates.
73    * returns the number of chars added to this ISet_char.
74    */

75   public void addAll(ISet_char set);
76
77   /**
78    * Removes from this set all of its elements that are contained in the specified set (optional operation).
79    * returns the number of chars that were removed.
80    */

81   public void removeAll(ISet_char set);
82
83   public void retainAll(ISet_char set);
84
85   public Object JavaDoc clone();
86
87 }
Popular Tags