idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
135,900 | private void calibrateLast ( ) throws JspTagException { last = ! hasNext ( ) || atEnd ( ) || ( end != - 1 && ( begin + index + step > end ) ) ; } | Sets last appropriately . |
135,901 | public static String postHexString ( String url , Map < String , String > queryParas , byte [ ] data , Map < String , String > headers ) { return HttpKit . post ( url , queryParas , HexKit . byteToHexString ( data ) , headers ) ; } | Send Hex String request |
135,902 | public static String post ( String url , Map < String , String > queryParas , byte [ ] data , Map < String , String > headers ) { return HttpKit . post ( url , queryParas , ( new String ( data ) ) , headers ) ; } | Send byte data by post request |
135,903 | public static String toStringToken ( String pValue ) { if ( pValue . indexOf ( '\"' ) < 0 && pValue . indexOf ( '\\' ) < 0 ) { return "\"" + pValue + "\"" ; } else { StringBuffer buf = new StringBuffer ( ) ; buf . append ( '\"' ) ; int len = pValue . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char ch = pValue . ... | Converts the specified value to a String token using as the enclosing quotes and escaping any characters that need escaping . |
135,904 | static boolean isJavaIdentifier ( String pValue ) { int len = pValue . length ( ) ; if ( len == 0 ) { return false ; } else { if ( ! Character . isJavaIdentifierStart ( pValue . charAt ( 0 ) ) ) { return false ; } else { for ( int i = 1 ; i < len ; i ++ ) { if ( ! Character . isJavaIdentifierPart ( pValue . charAt ( i ... | Returns true if the specified value is a legal java identifier |
135,905 | public static ValueExpression createValueExpression ( PageContext pageContext , String expression , Class < ? > expectedType ) { ExpressionFactory factory = getExpressionFactory ( pageContext ) ; return factory . createValueExpression ( pageContext . getELContext ( ) , expression , expectedType ) ; } | Create a value expression . |
135,906 | public static ExpressionFactory getExpressionFactory ( PageContext pageContext ) { JspApplicationContext appContext = JspFactory . getDefaultFactory ( ) . getJspApplicationContext ( pageContext . getServletContext ( ) ) ; return appContext . getExpressionFactory ( ) ; } | Return the JSP s ExpressionFactory . |
135,907 | public static < T > T evaluate ( ValueExpression expression , PageContext pageContext ) { if ( expression == null ) { return null ; } @ SuppressWarnings ( "unchecked" ) T value = ( T ) expression . getValue ( pageContext . getELContext ( ) ) ; return value ; } | Evaluate a value expression . To support optional attributes if the expression is null then null will be returned . |
135,908 | public static ExpressionEvaluator getEvaluatorByName ( String name ) throws JspException { try { ExpressionEvaluator evaluator = nameMap . get ( name ) ; if ( evaluator == null ) { nameMap . putIfAbsent ( name , ( ExpressionEvaluator ) Class . forName ( name ) . newInstance ( ) ) ; evaluator = nameMap . get ( name ) ; ... | Gets an ExpressionEvaluator from the cache or seeds the cache if we haven t seen a particular ExpressionEvaluator before . |
135,909 | public static Object coerce ( Object value , Class classe ) throws JspException { try { return Coercions . coerce ( value , classe , logger ) ; } catch ( ELException ex ) { throw new JspException ( ex ) ; } } | Performs a type conversion according to the EL s rules . |
135,910 | public Connection getConnection ( ) throws SQLException { Connection conn = null ; if ( driver != null ) { Properties props = new Properties ( ) ; if ( userName != null ) { props . put ( "user" , userName ) ; } if ( password != null ) { props . put ( "password" , password ) ; } conn = driver . connect ( jdbcURL , props... | Returns a Connection using the DriverManager and all set properties . |
135,911 | public Connection getConnection ( String username , String password ) throws SQLException { throw new SQLException ( Resources . getMessage ( "NOT_SUPPORTED" ) ) ; } | Always throws a SQLException . Username and password are set in the constructor and can not be changed . |
135,912 | public boolean isMatchingAttribute ( org . xml . sax . Attributes a ) { String attValue = a . getValue ( "" , attribute ) ; return ( attValue != null && attValue . equals ( target ) ) ; } | Returns true if the given SAX AttributeList is suitable given our attribute name and target ; returns false otherwise . |
135,913 | public static String replace ( String input , String before , String after ) { if ( before . length ( ) == 0 ) { return input ; } return input . replace ( before , after ) ; } | Returns a string resulting from replacing all occurrences of a before substring with an after substring . The string is processed once and not reprocessed for further replacements . |
135,914 | public static Class getPrimitiveObjectClass ( Class pClass ) { if ( pClass == Boolean . TYPE ) { return Boolean . class ; } else if ( pClass == Byte . TYPE ) { return Byte . class ; } else if ( pClass == Short . TYPE ) { return Short . class ; } else if ( pClass == Character . TYPE ) { return Character . class ; } else... | If the given class is a primitive class returns the object version of that class . Otherwise the class is just returned . |
135,915 | public int doStartTag ( ) throws JspException { try { XPathContext context = XalanUtil . getContext ( this , pageContext ) ; XObject result = select . execute ( context , context . getCurrentNode ( ) , null ) ; pageContext . setAttribute ( var , XalanUtil . coerceToJava ( result ) , scope ) ; return SKIP_BODY ; } catch... | applies XPath expression from select and stores the result in var |
135,916 | private boolean isPrivateIp ( String address ) { InetAddress ip ; try { ip = InetAddress . getByName ( address ) ; } catch ( UnknownHostException e ) { return false ; } return ip . isLoopbackAddress ( ) || ip . isLinkLocalAddress ( ) || ip . isSiteLocalAddress ( ) ; } | Determine whether or not the provided address is private . |
135,917 | private String getRedirectUrl ( HttpServletRequest request , String newScheme ) { String serverName = request . getServerName ( ) ; String uri = request . getRequestURI ( ) ; StringBuilder redirect = new StringBuilder ( 100 ) ; redirect . append ( newScheme ) ; redirect . append ( "://" ) ; redirect . append ( serverNa... | Return the full URL that should be redirected to including query parameters . |
135,918 | public String format ( Comment comment ) { if ( comment == null ) { return "" ; } StringBuilder sb = new StringBuilder ( ) ; for ( CommentElement e : comment ) { if ( e instanceof CommentText ) { sb . append ( renderText ( ( CommentText ) e ) ) ; } else if ( e instanceof InlineLink ) { sb . append ( renderLink ( ( Inli... | Render the comment as an HTML String . |
135,919 | public static void loadProps ( Properties props , File file ) throws IOException { FileInputStream fis = null ; try { fis = new FileInputStream ( file ) ; props . load ( fis ) ; } finally { if ( null != fis ) { fis . close ( ) ; } } } | Loads in the properties file |
135,920 | public static String normalize ( final CharSequence src , final Form form ) { return normalize ( src . toString ( ) , form ) ; } | Normalize a sequence of char values . The sequence will be normalized according to the specified normalization from . |
135,921 | public static boolean isNormalized ( final CharSequence src , final Form form ) { return StringUtils . equals ( src . toString ( ) , normalize ( src . toString ( ) , form ) ) ; } | Determines if the given sequence of char values is normalized . |
135,922 | public static void assertNotEmpty ( final String pstring , final String pmessage ) { if ( pstring == null || pstring . length ( ) == 0 ) { throw new IllegalArgumentException ( pmessage ) ; } } | check if a string is not empty . |
135,923 | public T getMin ( ) { if ( StringUtils . isEmpty ( getInputElement ( ) . getMin ( ) ) ) { return null ; } try { return this . numberParser . parse ( getInputElement ( ) . getMin ( ) ) ; } catch ( final ParseException e ) { return null ; } } | get minimum allowed value . |
135,924 | public T getMax ( ) { if ( StringUtils . isEmpty ( getInputElement ( ) . getMax ( ) ) ) { return null ; } try { return this . numberParser . parse ( getInputElement ( ) . getMax ( ) ) ; } catch ( final ParseException e ) { return null ; } } | get maximum allowed value . |
135,925 | private static boolean isIPv4MappedAddress ( final byte [ ] addr ) { if ( addr . length < INADDR16SZ ) { return false ; } return addr [ 0 ] == 0x00 && addr [ 1 ] == 0x00 && addr [ 2 ] == 0x00 && addr [ 3 ] == 0x00 && addr [ 4 ] == 0x00 && addr [ 5 ] == 0x00 && addr [ 6 ] == 0x00 && addr [ 7 ] == 0x00 && addr [ 8 ] == 0... | Utility routine to check if the InetAddress is an IPv4 mapped IPv6 address . |
135,926 | public void copyFactor ( DDF ddf , List < String > columns ) throws DDFException { if ( columns == null ) { columns = new ArrayList < String > ( ) ; } for ( Schema . Column col : ddf . getSchema ( ) . getColumns ( ) ) { if ( this . getDDF ( ) . getColumn ( col . getName ( ) ) != null && col . getColumnClass ( ) == Sche... | Transfer factor information from ddf to this DDF |
135,927 | public static < T > ValueBox < T > wrap ( final Element element , final Renderer < T > renderer , final Parser < T > parser ) { assert Document . get ( ) . getBody ( ) . isOrHasChild ( element ) ; final ValueBox < T > valueBox = new ValueBox < > ( element , renderer , parser ) ; valueBox . onAttach ( ) ; RootPanel . de... | Creates a ValueBox widget that wraps an existing < ; input type = text > ; element . |
135,928 | public static < T > void fire ( final HasFormSubmitHandlers < T > source , final T value ) { if ( type != null ) { final FormSubmitEvent < T > event = new FormSubmitEvent < > ( value ) ; source . fireEvent ( event ) ; } } | Fires a form submit event on all registered handlers in the handler manager . If no such handlers exist this method will do nothing . |
135,929 | private boolean checkAtVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; final int sum = pvatId . charAt ( 3 ) - '0' + squareSum ( ( pvatId . charAt ( 4 ) - '0' ) * 2 ) + pvatId . charAt ( 5 ) - '0' + squareSum ( ( pvatId . charAt ( 6 ) - '0' ) * 2 ) + pvatId . charAt ( 7 ) - '0' + squ... | check the VAT identification number country version for Austria . |
135,930 | private boolean checkBeVatId ( final String pvatId ) { final int numberPart = Integer . parseInt ( pvatId . substring ( 2 , 10 ) ) ; final int checkSum = Integer . parseInt ( pvatId . substring ( 10 ) ) ; final int calculatedCheckSumBe = MODULO_97 - numberPart % MODULO_97 ; return checkSum == calculatedCheckSumBe ; } | check the VAT identification number country version for Belgium . |
135,931 | private boolean checkDkVatId ( final String pvatId ) { final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 2 + ( pvatId . charAt ( 3 ) - '0' ) * 7 + ( pvatId . charAt ( 4 ) - '0' ) * 6 + ( pvatId . charAt ( 5 ) - '0' ) * 5 + ( pvatId . charAt ( 6 ) - '0' ) * 4 + ( pvatId . charAt ( 7 ) - '0' ) * 3 + ( pvatId . charAt ( 8... | check the VAT identification number country version for Denmark . |
135,932 | private boolean checkDeVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; int sum = 10 ; for ( int i = 2 ; i < 10 ; i ++ ) { int summe = ( pvatId . charAt ( i ) - '0' + sum ) % 10 ; if ( summe == 0 ) { summe = 10 ; } sum = 2 * summe % MODULO_11 ; } int calculatedCheckSum = MODULO_11 - s... | check the VAT identification number country version for Germany . |
135,933 | private boolean checkFiVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 9 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 7 + ( pvatId . charAt ( 3 ) - '0' ) * 9 + ( pvatId . charAt ( 4 ) - '0' ) * 10 + ( pvatId . charAt ( 5 ) - '0' ) * 5 + ( pvatId . charAt ( 6 ) - '0' ) * 8 + ( pvatI... | check the VAT identification number country version for Finland . |
135,934 | private boolean checkFrVatId ( final String pvatId ) { final int checkSum = Integer . parseInt ( pvatId . substring ( 2 , 4 ) ) ; final int sum = Integer . parseInt ( pvatId . substring ( 4 ) ) ; final int calculatedCheckSum = ( 12 + 3 * ( sum % MODULO_97 ) ) % MODULO_97 ; return checkSum == calculatedCheckSum ; } | check the VAT identification number country version for France . |
135,935 | private boolean checkGrVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 256 + ( pvatId . charAt ( 3 ) - '0' ) * 128 + ( pvatId . charAt ( 4 ) - '0' ) * 64 + ( pvatId . charAt ( 5 ) - '0' ) * 32 + ( pvatId . charAt ( 6 ) - '0' ) * 16 + ... | check the VAT identification number country version for Greece . |
135,936 | private boolean checkIeVatId ( final String pvatId ) { final char checkSum = pvatId . charAt ( 9 ) ; String vatId = pvatId ; if ( pvatId . charAt ( 3 ) >= 'A' && pvatId . charAt ( 3 ) <= 'Z' ) { vatId = pvatId . substring ( 0 , 2 ) + "0" + pvatId . substring ( 4 , 9 ) + pvatId . substring ( 2 , 3 ) + pvatId . substring... | check the VAT identification number country version for Ireland . |
135,937 | private boolean checkItVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 12 ) - '0' ; final int sum = pvatId . charAt ( 2 ) - '0' + squareSum ( ( pvatId . charAt ( 3 ) - '0' ) * 2 ) + pvatId . charAt ( 4 ) - '0' + squareSum ( ( pvatId . charAt ( 5 ) - '0' ) * 2 ) + pvatId . charAt ( 6 ) - '0' + squ... | check the VAT identification number country version for Italy . |
135,938 | private boolean checkLuVatId ( final String pvatId ) { final int numberPart = Integer . parseInt ( pvatId . substring ( 2 , 8 ) ) ; final int checkSum = Integer . parseInt ( pvatId . substring ( 8 ) ) ; final int calculatedCheckSum = numberPart % 89 ; return checkSum == calculatedCheckSum ; } | check the VAT identification number country version for Luxembourg . |
135,939 | private boolean checkNlVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 9 + ( pvatId . charAt ( 3 ) - '0' ) * 8 + ( pvatId . charAt ( 4 ) - '0' ) * 7 + ( pvatId . charAt ( 5 ) - '0' ) * 6 + ( pvatId . charAt ( 6 ) - '0' ) * 5 + ( pvatI... | check the VAT identification number country version for Netherlands . |
135,940 | private boolean checkNoVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 3 + ( pvatId . charAt ( 3 ) - '0' ) * 2 + ( pvatId . charAt ( 4 ) - '0' ) * 7 + ( pvatId . charAt ( 5 ) - '0' ) * 6 + ( pvatId . charAt ( 6 ) - '0' ) * 5 + ( pvatI... | check the VAT identification number country version for Norway . |
135,941 | private boolean checkPlVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 11 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 6 + ( pvatId . charAt ( 3 ) - '0' ) * 5 + ( pvatId . charAt ( 4 ) - '0' ) * 7 + ( pvatId . charAt ( 5 ) - '0' ) * 2 + ( pvatId . charAt ( 6 ) - '0' ) * 3 + ( pvatI... | check the VAT identification number country version for Poland . |
135,942 | private boolean checkPtVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 10 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 9 + ( pvatId . charAt ( 3 ) - '0' ) * 8 + ( pvatId . charAt ( 4 ) - '0' ) * 7 + ( pvatId . charAt ( 5 ) - '0' ) * 6 + ( pvatId . charAt ( 6 ) - '0' ) * 5 + ( pvatI... | check the VAT identification number country version for Portugal . |
135,943 | private boolean checkSeVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 11 ) - '0' ; final int sum = squareSum ( ( pvatId . charAt ( 2 ) - '0' ) * 2 ) + pvatId . charAt ( 3 ) - '0' + squareSum ( ( pvatId . charAt ( 4 ) - '0' ) * 2 ) + pvatId . charAt ( 5 ) - '0' + squareSum ( ( pvatId . charAt ( 6... | check the VAT identification number country version for Sweden . |
135,944 | private boolean checkSiVatId ( final String pvatId ) { boolean checkSumOk ; final int checkSum = pvatId . charAt ( 9 ) - '0' ; final int sum = ( pvatId . charAt ( 2 ) - '0' ) * 8 + ( pvatId . charAt ( 3 ) - '0' ) * 7 + ( pvatId . charAt ( 4 ) - '0' ) * 6 + ( pvatId . charAt ( 5 ) - '0' ) * 5 + ( pvatId . charAt ( 6 ) -... | check the VAT identification number country version for Slovenia . |
135,945 | private static int squareSum ( final int pvalue ) { int result = 0 ; for ( final char valueDigit : String . valueOf ( pvalue ) . toCharArray ( ) ) { result += Character . digit ( valueDigit , 10 ) ; } return result ; } | calculate square sum . |
135,946 | @ SuppressWarnings ( "checkstyle:rightCurly" ) boolean isAncestor ( final ClassLoader cl ) { ClassLoader acl = this ; do { acl = acl . parent ; if ( Objects . equals ( cl , acl ) ) { return true ; } } while ( acl != null ) ; return false ; } | loader s delegation chain . |
135,947 | public static String getValueWithGlobalDefault ( String section , ConfigConstant key ) { String value = getValue ( section , key ) ; return ( Strings . isNullOrEmpty ( value ) ? getGlobalValue ( key ) : value ) ; } | If the named section does not have the value then try the same key from the global section |
135,948 | @ ExceptionHandler ( MethodArgumentNotValidException . class ) @ ResponseStatus ( HttpStatus . BAD_REQUEST ) public ValidationResultInterface processValidationError ( final MethodArgumentNotValidException pexception ) { final BindingResult result = pexception . getBindingResult ( ) ; final List < FieldError > fieldErro... | handle validation errors . |
135,949 | public static Optional < File > resolvePluginDependency ( Dependency d , List < RemoteRepository > pluginRepos , ArtifactResolver resolver , RepositorySystemSession repoSystemSession ) { Artifact a = new DefaultArtifact ( d . getGroupId ( ) , d . getArtifactId ( ) , d . getClassifier ( ) , d . getType ( ) , d . getVers... | Uses the aether to resolve a plugin dependency and returns the file for further processing . |
135,950 | public static < T extends User , V extends EditorWithErrorHandling < ? , ? > , M extends LoginMessages , H extends HttpMessages > LoginCallback < T , V , M , H > buildLoginCallback ( final V pview , final Session psession , final M ploginErrorMessage ) { return new LoginCallback < > ( pview , psession , ploginErrorMess... | create login callback implementation . |
135,951 | private void fillEntries ( final Collection < T > pids ) { this . entries . clear ( ) ; final Stream < IdAndNameBean < T > > stream = pids . stream ( ) . map ( proEnum -> new IdAndNameBean < > ( proEnum , this . messages . name ( proEnum ) ) ) ; final Stream < IdAndNameBean < T > > sortedStream ; if ( this . sortOrder ... | fill entries of the radio buttons . |
135,952 | public void createRecursiveNavigation ( final TreeItem pitem , final List < NavigationEntryInterface > plist , final NavigationEntryInterface pactiveEntry ) { for ( final NavigationEntryInterface navEntry : plist ) { final TreeItem newItem ; if ( navEntry instanceof NavigationEntryFolder ) { newItem = new TreeItem ( na... | create navigation in a recursive way . |
135,953 | @ UiHandler ( "navTree" ) final void menuItemSelected ( final SelectionEvent < TreeItem > pselectionEvent ) { if ( selectedItem != null && ! selectedItem . equals ( pselectionEvent . getSelectedItem ( ) ) ) { pselectionEvent . getSelectedItem ( ) . setSelected ( false ) ; selectedItem . setSelected ( true ) ; } } | menu item is selected in the menu tree . |
135,954 | public PropertyDescriptorImpl shallowCopy ( ) { final ConstraintDescriptorImpl < ? > [ ] desc = new ConstraintDescriptorImpl < ? > [ descriptors . size ( ) ] ; descriptors . toArray ( desc ) ; return new PropertyDescriptorImpl ( name , elementClass , cascaded , parentBeanMetadata , validationGroupsMetadata , desc ) ; } | create a copy of this instance and return it . |
135,955 | public static ConstraintViolationException instantiate ( final SerializationStreamReader streamReader ) throws SerializationException { final String message = streamReader . readString ( ) ; @ SuppressWarnings ( "unchecked" ) final Set < ConstraintViolation < ? > > set = ( Set < ConstraintViolation < ? > > ) streamRead... | instantiate constraint violation exception . |
135,956 | public final SourceWriter getSourceWriter ( final JClassType pclassType , final GeneratorContext pcontext , final TreeLogger plogger ) { final String packageName = pclassType . getPackage ( ) . getName ( ) ; final String simpleName = pclassType . getSimpleSourceName ( ) + "Generated" ; final ClassSourceFileComposerFact... | get source writer for the generator . |
135,957 | public GroupChain getGroupChainFor ( final Collection < Class < ? > > groups ) { if ( groups == null || groups . isEmpty ( ) ) { throw new IllegalArgumentException ( "At least one group has to be specified." ) ; } groups . forEach ( clazz -> { if ( ! validationGroupsMetadata . containsGroup ( clazz ) && ! validationGro... | Generates a chain of groups to be validated given the specified validation groups . |
135,958 | private void insertInheritedGroups ( final Class < ? > clazz , final GroupChain chain ) { validationGroupsMetadata . getParentsOfGroup ( clazz ) . forEach ( inheritedGroup -> { final Group group = new Group ( inheritedGroup ) ; chain . insertGroup ( group ) ; insertInheritedGroups ( inheritedGroup , chain ) ; } ) ; } | Recursively add inherited groups into the group chain . |
135,959 | public void init ( final ConstraintValidatorFactory factory , final MessageInterpolator messageInterpolator , final TraversableResolver traversableResolver , final ParameterNameProvider pparameterNameProvider ) { contraintValidatorFactory = factory ; this . messageInterpolator = messageInterpolator ; this . traversable... | initialize values . |
135,960 | public String getList ( ) { String result = "" ; int i = 1 ; for ( String s : mReps . keySet ( ) ) { result += ( i ++ ) + ". key='" + s + "', value='" + mReps . get ( s ) + "'\n" ; } return result ; } | Returns a String list of current representations useful for debugging |
135,961 | @ SuppressWarnings ( { "unchecked" } ) public final ArrayList < ConstraintViolation < ? > > getValidationErrorSet ( final Object pclass ) { return new ArrayList < > ( validationErrorSet . stream ( ) . map ( violation -> ConstraintViolationImpl . forBeanValidation ( violation . getMessageTemplate ( ) , Collections . emp... | get validation error set . |
135,962 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public final void setValidationErrorSet ( final Set pvalidationErrorSet ) { validationErrorSet = new ArrayList < > ( ( List < SerializeableConstraintValidationImpl < ? > > ) pvalidationErrorSet . stream ( ) . map ( violation -> new SerializeableConstraintValidationImp... | set validation error set . |
135,963 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public void initializeEditors ( final Object editor ) { if ( editor instanceof HasValueChangeHandlers && valueChangeHandler != null ) { ( ( HasValueChangeHandlers ) editor ) . addValueChangeHandler ( valueChangeHandler ) ; if ( validateOnVueChangeHandler != null ) { (... | initialize one editor . |
135,964 | public final String create ( ) throws UnableToCompleteException { final SourceWriter sourceWriter = getSourceWriter ( logger , context ) ; if ( sourceWriter != null ) { writeClassBody ( sourceWriter ) ; sourceWriter . commit ( logger ) ; } return getQualifiedName ( ) ; } | create logger . |
135,965 | public static String getSystemProperty ( String dKey , String shellKey , String defautValue ) { String value = System . getProperty ( dKey ) ; if ( value == null || value . length ( ) == 0 ) { value = System . getenv ( shellKey ) ; if ( value == null || value . length ( ) == 0 ) { value = defautValue ; } } return value... | Get system property |
135,966 | private boolean checkEsTin ( final String ptin ) { final char [ ] checkArray = { 'T' , 'R' , 'W' , 'A' , 'G' , 'M' , 'Y' , 'F' , 'P' , 'D' , 'X' , 'B' , 'N' , 'J' , 'Z' , 'S' , 'Q' , 'V' , 'H' , 'L' , 'C' , 'K' , 'E' } ; final char checkSum = ptin . charAt ( 8 ) ; final char calculatedCheckSum ; final int sum ; if ( St... | check the Tax Identification Number number country version for Spain . |
135,967 | public final void setCountryCode ( final String pcountryCode , final Locale plocale ) { if ( StringUtils . isEmpty ( pcountryCode ) ) { defaultCountryData = null ; } else { defaultCountryData = CreatePhoneCountryConstantsClass . create ( plocale ) . countryMap ( ) . get ( pcountryCode ) ; } } | set country code . |
135,968 | public final String formatE123International ( final String pphoneNumber , final String pcountryCode ) { return this . formatE123International ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in E123 international format . |
135,969 | public final String formatE123National ( final String pphoneNumber , final String pcountryCode ) { return this . formatE123National ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in E123 national format . |
135,970 | public final String formatDin5008 ( final PhoneNumberInterface pphoneNumberData , final PhoneCountryData pcountryData ) { if ( pphoneNumberData != null && StringUtils . equals ( pcountryData . getCountryCodeData ( ) . getCountryCode ( ) , pphoneNumberData . getCountryCode ( ) ) ) { return this . formatDin5008National (... | format phone number in DIN 5008 format . |
135,971 | public final String formatDin5008National ( final String pphoneNumber , final String pcountryCode ) { return this . formatDin5008National ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in DIN 5008 national format . |
135,972 | public final String formatRfc3966 ( final String pphoneNumber , final String pcountryCode ) { return this . formatRfc3966 ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in RFC 3966 format . |
135,973 | public final String formatMs ( final String pphoneNumber , final String pcountryCode ) { return this . formatMs ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in Microsoft canonical address format . |
135,974 | public final String formatCommon ( final PhoneNumberInterface pphoneNumberData , final PhoneCountryData pcountryData ) { if ( pphoneNumberData != null && pcountryData != null && StringUtils . equals ( pcountryData . getCountryCodeData ( ) . getCountryCode ( ) , pphoneNumberData . getCountryCode ( ) ) ) { return this . ... | format phone number in common format . |
135,975 | public final String formatCommonInternational ( final String pphoneNumber , final String pcountryCode ) { return this . formatCommonInternational ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in common international format . |
135,976 | public final String formatCommonNational ( final String pphoneNumber , final String pcountryCode ) { return this . formatCommonNational ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ; } | format phone number in common national format . |
135,977 | public final String formatCommonNational ( final PhoneNumberInterface pphoneNumberData ) { final StringBuilder resultNumber = new StringBuilder ( ) ; if ( isPhoneNumberNotEmpty ( pphoneNumberData ) ) { PhoneCountryData phoneCountryData = null ; for ( final PhoneCountryCodeData country : CreatePhoneCountryConstantsClass... | format phone number in Common national format . |
135,978 | public final boolean isPhoneNumberEmpty ( final PhoneNumberInterface pphoneNumberData ) { return pphoneNumberData == null || StringUtils . isBlank ( pphoneNumberData . getCountryCode ( ) ) || StringUtils . isBlank ( pphoneNumberData . getLineNumber ( ) ) ; } | check if phone number is empty . |
135,979 | public GwtValidationContext < T > appendIndex ( final String name , final int index ) { final GwtValidationContext < T > temp = new GwtValidationContext < > ( this . rootBeanClass , this . rootBean , this . beanDescriptor , this . messageInterpolator , this . traversableResolver , this . validator , this . validatedObj... | Append an indexed node to the path . |
135,980 | public GwtValidationContext < T > appendIterable ( final String name ) { final GwtValidationContext < T > temp = new GwtValidationContext < > ( this . rootBeanClass , this . rootBean , this . beanDescriptor , this . messageInterpolator , this . traversableResolver , this . validator , this . validatedObjects ) ; temp .... | Append an iterable node to the path . |
135,981 | public GwtValidationContext < T > appendKey ( final String name , final Object key ) { final GwtValidationContext < T > temp = new GwtValidationContext < > ( this . rootBeanClass , this . rootBean , this . beanDescriptor , this . messageInterpolator , this . traversableResolver , this . validator , this . validatedObje... | Append a keyed node to the path . |
135,982 | public < A extends Annotation , V > ConstraintValidatorContextImpl < A , V > createConstraintValidatorContext ( final ConstraintDescriptor < A > descriptor ) { return new ConstraintValidatorContextImpl < > ( PathImpl . createCopy ( this . path ) , descriptor ) ; } | create constraint validator context . |
135,983 | public DDF groupBy ( List < String > groupedColumns , List < String > aggregateFunctions ) throws DDFException { mGroupedColumns = groupedColumns ; return agg ( aggregateFunctions ) ; } | dplyr - like |
135,984 | public static void prepare ( ) throws InterruptedException { semaphore . acquire ( ) ; if ( cacheReference == masterCache ) { slaveCache . clear ( ) ; } else { masterCache . clear ( ) ; } } | Prepare to build cache |
135,985 | public static void switchCache ( ) throws InterruptedException { if ( cacheReference == masterCache ) { cacheReference = slaveCache ; masterCache . clear ( ) ; } else { cacheReference = masterCache ; slaveCache . clear ( ) ; } } | Switch online and standby cache |
135,986 | public static TextBox wrap ( final Element element ) { assert Document . get ( ) . getBody ( ) . isOrHasChild ( element ) ; final TextBox textBox = new TextBox ( element ) ; textBox . onAttach ( ) ; RootPanel . detachOnWindowClose ( textBox ) ; return textBox ; } | Creates a TextBox widget that wraps an existing < ; input type = text > ; element . |
135,987 | static < T > Predicate < T > createMostSpecificMatchPredicate ( final Iterable < T > source , final Function < T , Class < ? > > toClass ) { return input -> { final Class < ? > inputClass = toClass . apply ( input ) ; for ( final Class < ? > match : Iterables . transform ( source , toClass ) ) { if ( ! inputClass . equ... | Creates a Predicate that returns false if source contains an associated class that is a super type of the class associated with the tested T . |
135,988 | static Set < Class < ? > > findBestMatches ( final Class < ? > target , final Set < Class < ? > > availableClasses ) { final Set < Class < ? > > matches = new HashSet < > ( ) ; if ( availableClasses . contains ( target ) ) { return ImmutableSet . < Class < ? > > of ( target ) ; } else { for ( final Class < ? > clazz : ... | Selects first only the classes that are assignable from the target and then returns the most specific matching classes . |
135,989 | @ SuppressWarnings ( "checkstyle:rightCurly" ) static < T > ImmutableList < T > sortMostSpecificFirst ( final Iterable < T > classes , final Function < T , Class < ? > > toClass ) { final List < T > working = Lists . newArrayList ( ) ; for ( final T t : classes ) { if ( ! working . contains ( t ) ) { working . add ( t ... | Returns a Immutable List sorted with the most specific associated class first . Each element is guaranteed to not be assignable to any element that appears before it in the list . |
135,990 | public static final KeyPressHandler getNumericAndUpperAsciiKeyPressHandler ( ) { if ( HandlerFactory . numericAndUpperAsciiKeyPressHandler == null ) { synchronized ( NumericAndUpperAsciiKeyPressHandler . class ) { if ( HandlerFactory . numericAndUpperAsciiKeyPressHandler == null ) { HandlerFactory . numericAndUpperAsci... | get a numeric and upper case key press handler . |
135,991 | public static final KeyPressHandler getNumericKeyPressHandler ( ) { if ( HandlerFactory . numericKeyPressHandler == null ) { synchronized ( NumericKeyPressHandler . class ) { if ( HandlerFactory . numericKeyPressHandler == null ) { HandlerFactory . numericKeyPressHandler = new NumericKeyPressHandler ( ) ; } } } return ... | get a numeric key press handler . |
135,992 | public static final KeyPressHandler getNumericWithSeparatorsKeyPressHandler ( ) { if ( HandlerFactory . numericWsKeyPressHandler == null ) { synchronized ( NumericWithSeparatorsKeyPressHandler . class ) { if ( HandlerFactory . numericWsKeyPressHandler == null ) { HandlerFactory . numericWsKeyPressHandler = new NumericW... | get a numeric with separators key press handler . |
135,993 | public static final KeyPressHandler getCurrencyKeyPressHandler ( ) { if ( HandlerFactory . currencyKeyPressHandler == null ) { synchronized ( CurrencyKeyPressHandler . class ) { if ( HandlerFactory . currencyKeyPressHandler == null ) { HandlerFactory . currencyKeyPressHandler = new CurrencyKeyPressHandler ( ) ; } } } r... | get a currency key press handler . |
135,994 | public static final KeyPressHandler getPercentKeyPressHandler ( ) { if ( HandlerFactory . percentKeyPressHandler == null ) { synchronized ( PercentKeyPressHandler . class ) { if ( HandlerFactory . percentKeyPressHandler == null ) { HandlerFactory . percentKeyPressHandler = new PercentKeyPressHandler ( ) ; } } } return ... | get a percent key press handler . |
135,995 | public static final KeyPressHandler getPhoneNumberKeyPressHandler ( ) { if ( HandlerFactory . phoneNumberKeyPressHandler == null ) { synchronized ( PhoneNumberKeyPressHandler . class ) { if ( HandlerFactory . phoneNumberKeyPressHandler == null ) { HandlerFactory . phoneNumberKeyPressHandler = new PhoneNumberKeyPressHan... | get a phone number key press handler . |
135,996 | public static final KeyPressHandler getDecimalKeyPressHandler ( ) { if ( HandlerFactory . decimalKeyPressHandler == null ) { synchronized ( DecimalKeyPressHandler . class ) { if ( HandlerFactory . decimalKeyPressHandler == null ) { HandlerFactory . decimalKeyPressHandler = new DecimalKeyPressHandler ( ) ; } } } return ... | get a decimal key press handler . |
135,997 | public static final KeyPressHandler getRegExKeyPressHandler ( final String pregEx ) { if ( StringUtils . isEmpty ( pregEx ) ) { return null ; } RegExKeyPressHandler result = HandlerFactory . REG_EX_KEY_PRESS_HANDLER_MAP . get ( pregEx ) ; if ( result == null ) { result = new RegExKeyPressHandler ( pregEx ) ; } return r... | get a key press handler which allows all characters which could match a reg ex . |
135,998 | public static final KeyPressHandler getFilterReplAndFormatStrKeyPressHandler ( ) { if ( HandlerFactory . filReplFormStrKeyPrH == null ) { synchronized ( DecimalKeyPressHandler . class ) { if ( HandlerFactory . filReplFormStrKeyPrH == null ) { HandlerFactory . filReplFormStrKeyPrH = new FilterReplaceAndFormatKeyPressHan... | get a filter replace and format String key press handler . |
135,999 | public static final KeyUpHandler getFormatStrKeyUpHandler ( ) { if ( HandlerFactory . formatStrKeyUpHandler == null ) { synchronized ( DecimalKeyPressHandler . class ) { if ( HandlerFactory . formatStrKeyUpHandler == null ) { HandlerFactory . formatStrKeyUpHandler = new FormatKeyUpHandler < > ( ) ; } } } return Handler... | get a format key up handler . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.