@ -29,6 +29,8 @@ import java.util.List;
import java.util.Objects ;
import java.util.Objects ;
import java.util.regex.Pattern ;
import java.util.regex.Pattern ;
import QrSegment.Mode ;
/ * *
/ * *
* A segment of character / binary / control data in a QR Code symbol .
* A segment of character / binary / control data in a QR Code symbol .
@ -189,16 +191,15 @@ public final class QrSegment {
* @throws NullPointerException if the mode or data is { @code null }
* @throws NullPointerException if the mode or data is { @code null }
* @throws IllegalArgumentException if the character count is negative
* @throws IllegalArgumentException if the character count is negative
* /
* /
public QrSegment ( Mode md, int numCh, BitBuffer data ) {
public QrSegment ( Mode _ mo de , int _ numberOf Characters , BitBuffer data ) {
mode = Objects . requireNonNull ( md) ;
mode = Objects . requireNonNull ( _ mo de ) ;
Objects . requireNonNull ( data ) ;
Objects . requireNonNull ( data ) ;
if ( numCh < 0 )
if ( _ numberOf Characters < 0 )
throw new IllegalArgumentException ( "Invalid value" ) ;
throw new IllegalArgumentException ( "Invalid value" ) ;
num Chars = numCh;
num berOf Character s = _ numberOf Characters ;
this . data = data . clone ( ) ; // Make defensive copy
this . data = data . clone ( ) ; // Make defensive copy
}
}
/*---- Methods ----*/
/*---- Methods ----*/
/ * *
/ * *