Java BitSet checkValidCharOnly(BitSet validChars, String value)

Here you can find the source of checkValidCharOnly(BitSet validChars, String value)

Description

check Valid Char Only

License

Apache License

Declaration

public static boolean checkValidCharOnly(BitSet validChars, String value) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.BitSet;

public class Main {

    public static boolean checkValidCharOnly(BitSet validChars, String value) {

        for (char c : value.toCharArray()) {
            if (!validChars.get(c)) {
                return false;
            }//from w ww . j a v a 2s.  co m
        }
        return true;
    }
}

Related

  1. byteArray2BitSet(byte[] bytes)
  2. bytes2bitset(byte[] bytes, byte nbyte, BitSet bits)
  3. bytesToBits(byte[] b, BitSet ba, int maxSize)
  4. cardinalityOf(BitSet bs)
  5. check(BitSet originalMessage, int messageLength, BitSet polynomial, int polynomialLength)
  6. clear(BitSet bitSet_)
  7. combine(int length, BitSet... bitsets)
  8. compare(BitSet a, BitSet b)
  9. copy(BitSet bs)