public class bitPair { // Constructors public bitPair(String pair); §bitPair public bitPair(int pair); §bitPair public bitPair(bit b1, bit b0); §bitPair // Methods public boolean matches(bitPair pair); §matches public boolean matches(String pair); §matches public boolean matches(int pair); §matches public boolean matches(bit b1, bit b0); §matches public boolean matches(bit B); §matches public byte toByte(); §toByte }This class represents bit pairs, and does conversions and comparisons. Provided as is for CS420.
bitPair
public bitPair(String pair);
pair
-
the String to be converted to a bit pair
public bitPair(int pair);
pair
-
the int to be converted to a bit pair
public bitPair(bit b1, bit b0);
b1
-
the more signifiacnt of two bits to be converted to a bit pair
b0
-
the less signifiacnt of two bits to be converted to a bit pair
public boolean matches(bitPair pair)
pair
-
the bit pair to be compared
public boolean matches(String pair)
pair
-
the string to be compared with the bit pair
public boolean matches(int pair)
pair
-
the int to be compared with the bit pair
public boolean matches(bit b1, bit b0)
b1
-
the more significant of two bits to be compared with the bit pair
b0
-
the less significant of two bits to be compared with the bit pair
public boolean matches(bit B)
B
-
the bit to be compared with the bit pair
public byte toByte()