123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- /*
- *
- *
- * Copyright 1999-2003 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- *
- * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
- * @version $Revision$ $Name$
- */
- // $Id$
- package org.apache.fop.datastructs;
-
- import java.util.BitSet;
-
-
- /**
- * Implements a Read-Only <tt>BitSet</tt>. The set is created as a copy of
- * the set provided in the constructor, and no subsequent changes can occur.
- * All read operations from <tt>BitSet</tt> are preserved.
- */
- public class ROBitSet extends BitSet {
-
- /**
- * Initialise with <tt>BitSet</tt>. This is the only operation that
- * modifies the bit set.
- * @param bitset the unmodifiable <tt>Bitset</tt>
- */
- public ROBitSet(BitSet bitset) {
- super(bitset.length());
- super.or(bitset);
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param set <tt>BitSet</tt>
- * @exception UnsupportedOperationException
- */
- public void and(BitSet set) {
- throw new UnsupportedOperationException("and invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param set <tt>BitSet</tt>
- * @exception UnsupportedOperationException
- */
- public void andNot(BitSet set) {
- throw new UnsupportedOperationException("andNot invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @exception UnsupportedOperationException
- */
- public void clear() {
- throw new UnsupportedOperationException("clear invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param bitIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void clear(int bitIndex) {
- throw new UnsupportedOperationException("clear invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param fromIndex <tt>int</tt>
- * @param toIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void clear(int fromIndex, int toIndex) {
- throw new UnsupportedOperationException("clear invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param bitIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void flip(int bitIndex) {
- throw new UnsupportedOperationException("flip invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param fromIndex <tt>int</tt>
- * @param toIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void flip(int fromIndex, int toIndex) {
- throw new UnsupportedOperationException("flip invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param set <tt>BitSet</tt>
- * @exception UnsupportedOperationException
- */
- public void or(BitSet set) {
- throw new UnsupportedOperationException("or invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param bitIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void set(int bitIndex) {
- throw new UnsupportedOperationException("set invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param bitIndex <tt>int</tt>
- * @param value <tt>boolean</tt>
- * @exception UnsupportedOperationException
- */
- public void set(int bitIndex, boolean value) {
- throw new UnsupportedOperationException("set invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param fromIndex <tt>int</tt>
- * @param toIndex <tt>int</tt>
- * @exception UnsupportedOperationException
- */
- public void set(int fromIndex, int toIndex) {
- throw new UnsupportedOperationException("set invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param fromIndex <tt>int</tt>
- * @param toIndex <tt>int</tt>
- * @param value <tt>boolean</tt>
- * @exception UnsupportedOperationException
- */
- public void set(int fromIndex, int toIndex, boolean value) {
- throw new UnsupportedOperationException("set invalid in ROBitSet");
- }
-
- /**
- * Unsupported operation. Overrides <tt>BitSet</tt> method.
- * @param set <tt>BitSet</tt>
- * @exception UnsupportedOperationException
- */
- public void xor(BitSet set) {
- throw new UnsupportedOperationException("xor invalid in ROBitSet");
- }
-
- }
|