Javolution 6.0.0 java
BitSetService.java
Go to the documentation of this file.
1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2012 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */
9 package javolution.util.service;
10 
13 import javolution.util.Index;
14 
23 public interface BitSetService extends SetService<Index> {
24 
25  //
26  // Read Accessors.
27  //
28 
30  int cardinality();
31 
33  boolean get(int bitIndex);
34 
36  BitSetService get(int fromIndex, int toIndex);
37 
39  boolean intersects(BitSetService that);
40 
42  int length();
43 
44  //
45  // Iterations
46  //
47 
49  int nextClearBit(int fromIndex);
50 
52  int nextSetBit(int fromIndex);
53 
55  int previousClearBit(int fromIndex);
56 
58  int previousSetBit(int fromIndex);
59 
60  //
61  // Clear/Set/Flip Operations
62  //
63 
65  void clear(int bitIndex);
66 
68  void clear(int fromIndex, int toIndex);
69 
72  boolean getAndSet(int bitIndex, boolean value);
73 
75  void set(int bitIndex);
76 
78  void set(int bitIndex, boolean value);
79 
81  void set(int fromIndex, int toIndex);
82 
84  void set(int fromIndex, int toIndex, boolean value);
85 
87  void flip(int bitIndex);
88 
90  void flip(int fromIndex, int toIndex);
91 
92  //
93  // Operators Operations
94  //
95 
97  void and(BitSetService that);
98 
100  void andNot(BitSetService that);
101 
103  void or(BitSetService that);
104 
106  void xor(BitSetService that);
107 
108  //
109  // Misc.
110  //
111 
114  long[] toLongArray();
115 
116 }
javolution.util.service.BitSetService.previousSetBit
int previousSetBit(int fromIndex)
javolution
javolution.util.service.BitSetService.cardinality
int cardinality()
javolution.util.service.BitSetService.flip
void flip(int fromIndex, int toIndex)
javolution.util.service.BitSetService.nextClearBit
int nextClearBit(int fromIndex)
javolution.util.service.BitSetService.clear
void clear(int fromIndex, int toIndex)
javolution.util.service.BitSetService.toLongArray
long[] toLongArray()
javolution.util.service.BitSetService.length
int length()
javolution.util.service.BitSetService.and
void and(BitSetService that)
javolution.util.service.BitSetService.andNot
void andNot(BitSetService that)
javolution.util.service.BitSetService
Definition: BitSetService.java:23
javolution.util.Index
Definition: Index.java:44
javolution.util.service.BitSetService.nextSetBit
int nextSetBit(int fromIndex)
javolution.util.service.BitSetService.or
void or(BitSetService that)
javolution.util.service.BitSetService.flip
void flip(int bitIndex)
javolution.util.service.BitSetService.previousClearBit
int previousClearBit(int fromIndex)
javolution.util.service.BitSetService.clear
void clear(int bitIndex)
javolution.util.service.SetService
Definition: SetService.java:19
javolution.util.FastBitSet
Definition: FastBitSet.java:27
javolution.util.service.BitSetService.getAndSet
boolean getAndSet(int bitIndex, boolean value)
javolution.util.service.BitSetService.intersects
boolean intersects(BitSetService that)
javolution.util
Definition: FastBitSet.java:9
javolution.util.FastTable
Definition: FastTable.java:88
javolution.util.service.BitSetService.xor
void xor(BitSetService that)