idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
14,500 | public static int search ( int [ ] intArray , int value ) { int start = 0 ; int end = intArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == intArray [ middle ] ) { return middle ; } if ( value < intArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted int array and return the index . |
14,501 | public static int search ( char [ ] charArray , char value ) { int start = 0 ; int end = charArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == charArray [ middle ] ) { return middle ; } if ( value < charArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted char array and return the index . |
14,502 | public static int search ( byte [ ] byteArray , byte value ) { int start = 0 ; int end = byteArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == byteArray [ middle ] ) { return middle ; } if ( value < byteArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted byte array and return the index . |
14,503 | public static int search ( short [ ] shortArray , short value ) { int start = 0 ; int end = shortArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == shortArray [ middle ] ) { return middle ; } if ( value < shortArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted short array and return the index . |
14,504 | public static int search ( long [ ] longArray , long value ) { int start = 0 ; int end = longArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == longArray [ middle ] ) { return middle ; } if ( value < longArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted long array and return the index . |
14,505 | public static int search ( float [ ] floatArray , float value ) { int start = 0 ; int end = floatArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == floatArray [ middle ] ) { return middle ; } if ( value < floatArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted float array and return the index . |
14,506 | public static int search ( double [ ] doubleArray , double value ) { int start = 0 ; int end = doubleArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == doubleArray [ middle ] ) { return middle ; } if ( value < doubleArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the sorted double array and return the index . |
14,507 | public static int searchDescending ( int [ ] intArray , int value ) { int start = 0 ; int end = intArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == intArray [ middle ] ) { return middle ; } if ( value > intArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted int array and return the index . |
14,508 | public static int searchDescending ( char [ ] charArray , char value ) { int start = 0 ; int end = charArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == charArray [ middle ] ) { return middle ; } if ( value > charArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted char array and return the index . |
14,509 | public static int searchDescending ( byte [ ] byteArray , byte value ) { int start = 0 ; int end = byteArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == byteArray [ middle ] ) { return middle ; } if ( value > byteArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted byte array and return the index . |
14,510 | public static int searchDescending ( short [ ] shortArray , short value ) { int start = 0 ; int end = shortArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == shortArray [ middle ] ) { return middle ; } if ( value > shortArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted short array and return the index . |
14,511 | public static int searchDescending ( long [ ] longArray , long value ) { int start = 0 ; int end = longArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == longArray [ middle ] ) { return middle ; } if ( value > longArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted long array and return the index . |
14,512 | public static int searchDescending ( float [ ] floatArray , float value ) { int start = 0 ; int end = floatArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == floatArray [ middle ] ) { return middle ; } if ( value > floatArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted float array and return the index . |
14,513 | public static int searchDescending ( double [ ] doubleArray , double value ) { int start = 0 ; int end = doubleArray . length - 1 ; int middle = 0 ; while ( start <= end ) { middle = ( start + end ) >> 1 ; if ( value == doubleArray [ middle ] ) { return middle ; } if ( value > doubleArray [ middle ] ) { end = middle - 1 ; } else { start = middle + 1 ; } } return - 1 ; } | Search for the value in the reverse sorted double array and return the index . |
14,514 | public void runPageLoader ( ) { SwingUtilities . invokeLater ( new Thread ( ) { public void run ( ) { if ( m_syncPage instanceof Task ) { String strWaitMessage = WAIT_MESSAGE ; try { strWaitMessage = ( ( Task ) m_syncPage ) . getApplication ( ) . getResources ( ThinResourceConstants . ERROR_RESOURCE , true ) . getString ( strWaitMessage ) ; } catch ( MissingResourceException ex ) { } ( ( Task ) m_syncPage ) . setStatusText ( strWaitMessage , Constants . WAIT ) ; } else if ( m_syncPage instanceof JBasePanel ) { if ( ( ( JBasePanel ) m_syncPage ) . getBaseApplet ( ) != null ) { String strWaitMessage = WAIT_MESSAGE ; try { strWaitMessage = ( ( ( JBasePanel ) m_syncPage ) . getBaseApplet ( ) ) . getApplication ( ) . getResources ( ThinResourceConstants . ERROR_RESOURCE , true ) . getString ( strWaitMessage ) ; } catch ( MissingResourceException ex ) { } ( ( JBasePanel ) m_syncPage ) . getBaseApplet ( ) . setStatusText ( strWaitMessage , Constants . WAIT ) ; } } Cursor waitCursor = Cursor . getPredefinedCursor ( Cursor . WAIT_CURSOR ) ; if ( m_syncPage instanceof Component ) { ( ( Component ) m_syncPage ) . setCursor ( waitCursor ) ; ( ( Component ) m_syncPage ) . repaint ( ) ; } if ( m_swingPageLoader != null ) m_swingPageLoader . run ( ) ; if ( m_syncPage instanceof Component ) ( ( Component ) m_syncPage ) . repaint ( ) ; } } ) ; } | Invoke the page loader that was passed into the constructor . If you override this remember to invoke your code in the awt thread . |
14,515 | public void afterPageDisplay ( ) { SwingWorker < String , String > worker = new SwingWorker < String , String > ( ) { public String doInBackground ( ) { return null ; } public void done ( ) { SwingSyncPageWorker . this . done ( ) ; if ( m_syncPage instanceof Task ) { ( ( Task ) m_syncPage ) . setStatusText ( null , Constants . INFORMATION ) ; } else if ( m_syncPage instanceof JBasePanel ) { if ( ( ( JBasePanel ) m_syncPage ) . getBaseApplet ( ) != null ) ( ( JBasePanel ) m_syncPage ) . getBaseApplet ( ) . setStatusText ( null , Constants . INFORMATION ) ; } Cursor waitCursor = Cursor . getPredefinedCursor ( Cursor . DEFAULT_CURSOR ) ; if ( m_syncPage instanceof Component ) { ( ( Component ) m_syncPage ) . setCursor ( waitCursor ) ; ( ( Component ) m_syncPage ) . repaint ( ) ; } } } ; worker . execute ( ) ; } | Do this code after the page has displayed on the screen . Override this method . |
14,516 | public ScreenComponent setupDefaultView ( ScreenLoc itsLocation , ComponentParent targetScreen , Convert converter , int iDisplayFieldDesc , Map < String , Object > properties ) { return null ; } | Set up the default screen control for this field . You should override this method depending of the concrete display type . |
14,517 | public void moveSQLToField ( ResultSet resultset , int iColumn ) throws SQLException { InputStream inStream = resultset . getBinaryStream ( iColumn ) ; if ( resultset . wasNull ( ) ) this . setData ( null , false , DBConstants . READ_MOVE ) ; else { try { byte rgBytes [ ] = new byte [ 2048 ] ; ByteArrayOutputStream baOut = new ByteArrayOutputStream ( ) ; while ( true ) { int iRead = 0 ; try { iRead = inStream . read ( rgBytes ) ; } catch ( EOFException ex ) { iRead = 0 ; } if ( iRead > 0 ) baOut . write ( rgBytes , 0 , iRead ) ; if ( iRead < rgBytes . length ) break ; } rgBytes = baOut . toByteArray ( ) ; Object objData = null ; if ( rgBytes . length > 0 ) { String string = new String ( rgBytes , BundleConstants . OBJECT_ENCODING ) ; objData = ClassServiceUtility . getClassService ( ) . convertStringToObject ( string , null ) ; } this . setData ( objData , false , DBConstants . READ_MOVE ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } catch ( ClassNotFoundException ex ) { ex . printStackTrace ( ) ; } } } | Move the physical binary data to this SQL parameter row . This method uses the getBinaryStream resultset method . |
14,518 | public void getSQLFromField ( PreparedStatement statement , int iType , int iParamColumn ) throws SQLException { if ( this . isNull ( ) ) statement . setNull ( iParamColumn , Types . BLOB ) ; else { Object data = this . getData ( ) ; ByteArrayOutputStream ostream = new ByteArrayOutputStream ( ) ; ObjectOutputStream p = null ; try { p = new ObjectOutputStream ( ostream ) ; p . writeObject ( data ) ; p . flush ( ) ; ostream . close ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } byte [ ] rgBytes = ostream . toByteArray ( ) ; InputStream iStream = new ByteArrayInputStream ( rgBytes ) ; try { statement . setBinaryStream ( iParamColumn , iStream , rgBytes . length ) ; } catch ( java . lang . ArrayIndexOutOfBoundsException ex ) { ex . printStackTrace ( ) ; } } } | Move the physical binary data to this SQL parameter row . This method uses the setBinaryStrem statement method . |
14,519 | private boolean isValidCommandMethod ( Object service , String commandName ) { try { service . getClass ( ) . getMethod ( commandName , PrintWriter . class , String [ ] . class ) ; return true ; } catch ( NoSuchMethodException e ) { return false ; } } | Validate Command method |
14,520 | public ESigItemIssue addIssue ( ESigItemIssueSeverity severity , String description ) { ESigItemIssue issue = new ESigItemIssue ( severity , description ) ; if ( issues == null ) { issues = new ArrayList < ESigItemIssue > ( ) ; sortIssues = false ; } else { int i = issues . indexOf ( issue ) ; if ( i >= 0 ) { return issues . get ( i ) ; } sortIssues = true ; } issues . add ( issue ) ; return issue ; } | Adds an issue to the signature item . |
14,521 | public Iterable < ESigItemIssue > getIssues ( ) { if ( sortIssues ) { sortIssues = false ; Collections . sort ( issues ) ; } return issues ; } | Returns an iterable of issues logged for this item . |
14,522 | public CalendarItem getCalendarItem ( Rec fieldList ) { return new CalendarRecordItem ( this , - 1 , 0 , 1 , 2 , - 1 ) { public Object getIcon ( int iIconType ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ImageField field = null ; String fieldSeq = ( iIconType == CalendarConstants . START_ICON ) ? ProjectControl . START_PARENT_ICON : ProjectControl . END_PARENT_ICON ; if ( this . isParentTask ( ) ) field = ( ImageField ) recProjectControl . getField ( fieldSeq ) ; fieldSeq = ( iIconType == CalendarConstants . START_ICON ) ? ProjectControl . START_ICON : ProjectControl . END_ICON ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ImageField ) recProjectControl . getField ( fieldSeq ) ; if ( field . isNull ( ) ) return super . getIcon ( iIconType ) ; return field . getImage ( ) . getImage ( ) ; } public int getHighlightColor ( ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ColorField field = null ; if ( this . isParentTask ( ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . PARENT_TASK_COLOR ) ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . TASK_COLOR ) ; if ( field . isNull ( ) ) return super . getHighlightColor ( ) ; return field . getColor ( ) ; } public int getSelectColor ( ) { Record recProjectControl = getRecord ( ProjectControl . PROJECT_CONTROL_FILE ) ; ColorField field = null ; if ( this . isParentTask ( ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . PARENT_TASK_SELECT_COLOR ) ; if ( ( field == null ) || ( field . isNull ( ) ) ) field = ( ColorField ) recProjectControl . getField ( ProjectControl . TASK_SELECT_COLOR ) ; if ( field . isNull ( ) ) return super . getSelectColor ( ) ; return field . getColor ( ) ; } public boolean isParentTask ( ) { return ( ( ProjectTask ) getMainRecord ( ) ) . isParentTask ( ) ; } } ; } | Get the CalendarItem for this record . |
14,523 | public AbstractDLock setLockProperties ( Properties lockProps ) { this . lockProps = lockProps != null ? new Properties ( lockProps ) : new Properties ( ) ; return this ; } | Lock s custom properties . |
14,524 | protected String getLockProperty ( String key ) { return lockProps != null ? lockProps . getProperty ( key ) : null ; } | Get lock s custom property . |
14,525 | private void addCell ( Listitem item , Object value ) { createCell ( item , value , null , null ) ; } | Add a cell to the list item containing the specified text value . |
14,526 | public static List getClasspathDirectories ( ) { List directories = new ArrayList ( ) ; List components = getClasspathComponents ( ) ; for ( Iterator i = components . iterator ( ) ; i . hasNext ( ) ; ) { String possibleDir = ( String ) i . next ( ) ; File file = new File ( possibleDir ) ; if ( file . isDirectory ( ) ) { directories . add ( possibleDir ) ; } } List tomcatPaths = getTomcatPaths ( ) ; if ( tomcatPaths != null ) { directories . addAll ( tomcatPaths ) ; } return directories ; } | Returns the classpath as a list of directories . Any classpath component that is not a directory will be ignored . |
14,527 | public static List getClasspathArchives ( ) { List archives = new ArrayList ( ) ; List components = getClasspathComponents ( ) ; for ( Iterator i = components . iterator ( ) ; i . hasNext ( ) ; ) { String possibleDir = ( String ) i . next ( ) ; File file = new File ( possibleDir ) ; if ( file . isFile ( ) && ( file . getName ( ) . endsWith ( ".jar" ) || file . getName ( ) . endsWith ( ".zip" ) ) ) { archives . add ( possibleDir ) ; } } return archives ; } | Returns the classpath as a list of the names of archive files . Any classpath component that is not an archive will be ignored . |
14,528 | public static List getClasspathComponents ( ) { List components = new LinkedList ( ) ; ClassLoader cl = Thread . currentThread ( ) . getContextClassLoader ( ) ; while ( ( null != cl ) && ( cl instanceof URLClassLoader ) ) { URLClassLoader ucl = ( URLClassLoader ) cl ; components . addAll ( getUrlClassLoaderClasspathComponents ( ucl ) ) ; try { cl = ucl . getParent ( ) ; } catch ( SecurityException se ) { cl = null ; } } String classpath = System . getProperty ( "java.class.path" ) ; String separator = System . getProperty ( "path.separator" ) ; StringTokenizer st = new StringTokenizer ( classpath , separator ) ; while ( st . hasMoreTokens ( ) ) { String component = st . nextToken ( ) ; component = getCanonicalPath ( component ) ; components . add ( component ) ; } return new LinkedList ( new HashSet ( components ) ) ; } | Returns the classpath as a list directory and archive names . |
14,529 | private static List getUrlClassLoaderClasspathComponents ( URLClassLoader ucl ) { List components = new ArrayList ( ) ; URL [ ] urls = new URL [ 0 ] ; if ( ucl . getClass ( ) . getName ( ) . equals ( "org.jboss.mx.loading.UnifiedClassLoader3" ) ) { try { Method classPathMethod = ucl . getClass ( ) . getMethod ( "getClasspath" , new Class [ ] { } ) ; urls = ( URL [ ] ) classPathMethod . invoke ( ucl , new Object [ 0 ] ) ; } catch ( Exception e ) { LogFactory . getLog ( ClasspathUtils . class ) . debug ( "Error invoking getClasspath on UnifiedClassLoader3: " , e ) ; } } else { urls = ucl . getURLs ( ) ; } for ( int i = 0 ; i < urls . length ; i ++ ) { URL url = urls [ i ] ; components . add ( getCanonicalPath ( url . getPath ( ) ) ) ; } return components ; } | Get the list of classpath components |
14,530 | public FileSystemManager provide ( ) { try { return VFS . getManager ( ) ; } catch ( FileSystemException fse ) { logger . error ( "Cannot create FileSystemManager" , fse ) ; throw new RuntimeException ( "Cannot create FileSystemManager" , fse ) ; } } | Provide the file system manager . |
14,531 | public void setupMiddleSFields ( ) { new SCannedBox ( this . getNextLocation ( ScreenConstants . RIGHT_OF_LAST_BUTTON_WITH_GAP , ScreenConstants . SET_ANCHOR ) , this , null , ScreenConstants . DEFAULT_DISPLAY , MenuConstants . DISPLAY ) ; new SCannedBox ( this . getNextLocation ( ScreenConstants . RIGHT_OF_LAST_BUTTON_WITH_GAP , ScreenConstants . SET_ANCHOR ) , this , null , ScreenConstants . DEFAULT_DISPLAY , MenuConstants . PRINT ) ; } | Controls for a report screen . |
14,532 | public static String encode ( String string ) { try { return encode ( string . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new BugError ( "JVM with missing support for UTF-8." ) ; } } | Encode string value into Base64 format . |
14,533 | public static byte [ ] decode ( String base64 ) { int iLen = base64 . length ( ) ; if ( iLen % 4 != 0 ) { throw new IllegalArgumentException ( "Length of Base64 encoded input string is not a multiple of 4." ) ; } while ( iLen > 0 && base64 . charAt ( iLen - 1 ) == '=' ) { iLen -- ; } int oLen = ( iLen * 3 ) / 4 ; byte [ ] out = new byte [ oLen ] ; int ip = 0 , op = 0 ; while ( ip < iLen ) { int i0 = base64 . charAt ( ip ++ ) ; int i1 = base64 . charAt ( ip ++ ) ; int i2 = ip < iLen ? base64 . charAt ( ip ++ ) : 'A' ; int i3 = ip < iLen ? base64 . charAt ( ip ++ ) : 'A' ; if ( i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127 ) { throw new IllegalArgumentException ( "Illegal character in Base64 encoded data." ) ; } int b0 = CHARS_2_NIBLES [ i0 ] ; int b1 = CHARS_2_NIBLES [ i1 ] ; int b2 = CHARS_2_NIBLES [ i2 ] ; int b3 = CHARS_2_NIBLES [ i3 ] ; if ( b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0 ) { throw new IllegalArgumentException ( "Illegal character in Base64 encoded data." ) ; } int o0 = ( b0 << 2 ) | ( b1 >>> 4 ) ; int o1 = ( ( b1 & 0xf ) << 4 ) | ( b2 >>> 2 ) ; int o2 = ( ( b2 & 3 ) << 6 ) | b3 ; out [ op ++ ] = ( byte ) o0 ; if ( op < oLen ) { out [ op ++ ] = ( byte ) o1 ; } if ( op < oLen ) { out [ op ++ ] = ( byte ) o2 ; } } return out ; } | Decodes a byte array from a Base64 formated string . No blanks or line breaks are allowed within the Base64 encoded data . |
14,534 | public < T > T getSessionObject ( Class < T > type , String name ) { T value = ( T ) session . get ( name ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Recovering object [" + name + "] from session with value [" + value + "]" ) ; } return value ; } | Recovered a object from the session . |
14,535 | public void addObjectToSession ( String name , Object value ) { if ( session == null ) { session = new HashMap < > ( ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Add object [" + name + "] to session with value [" + value + "]" ) ; } session . put ( name , value ) ; } | Add a object into the session . |
14,536 | public void setJobInProgress ( Boolean workInProgress ) { lastDateInfo = new SimpleDateFormat ( FILENAME_DATE_PATTERN ) . format ( new Date ( ) ) ; this . jobInProgress = workInProgress ; } | Set the connection status . |
14,537 | public void free ( RecordOwner recordOwner ) { if ( m_ScreenRecord != null ) if ( ( recordOwner == null ) || ( m_ScreenRecord . getRecordOwner ( ) == recordOwner ) ) { m_ScreenRecord . free ( ) ; m_ScreenRecord = null ; } while ( this . size ( ) > 0 ) { Record record = ( Record ) this . elementAt ( 0 ) ; if ( ( recordOwner == null ) || ( record . getRecordOwner ( ) == recordOwner ) ) record . free ( ) ; else this . removeRecord ( record ) ; } this . removeAllElements ( ) ; } | Free all the records in this list . |
14,538 | public void addRecord ( Rec record , boolean bMainQuery ) { if ( record == null ) return ; if ( this . contains ( record ) ) { if ( ! bMainQuery ) return ; this . removeRecord ( record ) ; } if ( bMainQuery ) this . insertElementAt ( record , 0 ) ; else this . addElement ( record ) ; } | Add this record to this list . |
14,539 | public Record getMainRecord ( ) { Record record = null ; if ( this . size ( ) > 0 ) { record = ( Record ) this . firstElement ( ) ; if ( record != null ) if ( record == this . getScreenRecord ( ) ) { record = null ; if ( this . size ( ) >= 2 ) record = ( Record ) this . elementAt ( 1 ) ; } } return record ; } | Get the main record for this list . |
14,540 | public Record getRecordAt ( int i ) { i -= DBConstants . MAIN_FIELD ; try { return ( Record ) this . elementAt ( i ) ; } catch ( ArrayIndexOutOfBoundsException e ) { } return null ; } | Get the record as this position in the record list . |
14,541 | protected void loadData ( ) { if ( patient == null ) { asyncAbort ( ) ; reset ( ) ; status ( "No patient selected." ) ; } else { super . loadData ( ) ; } detailView . setValue ( null ) ; } | Override load list to clear display if no patient in context . |
14,542 | protected void showDetail ( Listitem li ) { @ SuppressWarnings ( "unchecked" ) T value = li == null ? null : ( T ) li . getValue ( ) ; String detail = value == null ? null : getDetail ( value ) ; detailView . setValue ( detail ) ; if ( ! getShowDetailPane ( ) && detail != null ) { ReportBox . modal ( detail , detailTitle , getAllowPrint ( ) ) ; } } | Show detail for specified list item . |
14,543 | private static void setMethodAccessible ( Method method ) { try { if ( ! method . isAccessible ( ) ) { method . setAccessible ( true ) ; } } catch ( SecurityException se ) { if ( ! loggedAccessibleWarning ) { boolean vulnerableJVM = false ; try { String specVersion = System . getProperty ( "java.specification.version" ) ; if ( specVersion . charAt ( 0 ) == '1' && ( specVersion . charAt ( 2 ) == '0' || specVersion . charAt ( 2 ) == '1' || specVersion . charAt ( 2 ) == '2' || specVersion . charAt ( 2 ) == '3' ) ) { vulnerableJVM = true ; } } catch ( SecurityException e ) { vulnerableJVM = true ; } if ( vulnerableJVM ) { log . warn ( "Current Security Manager restricts use of workarounds for reflection bugs " + " in pre-1.4 JVMs." ) ; } loggedAccessibleWarning = true ; } log . debug ( "Cannot setAccessible on method. Therefore cannot use jvm access bug workaround." , se ) ; } } | Try to make the method accessible |
14,544 | public static Class < ? > toNonPrimitiveClass ( Class < ? > clazz ) { if ( clazz . isPrimitive ( ) ) { Class < ? > primitiveClazz = MethodUtils . getPrimitiveWrapper ( clazz ) ; if ( primitiveClazz != null ) { return primitiveClazz ; } else { return clazz ; } } else { return clazz ; } } | Find a non primitive representation for given primitive class . |
14,545 | private static Method getCachedMethod ( MethodDescriptor md ) { if ( CACHE_METHODS ) { Reference < Method > methodRef = cache . get ( md ) ; if ( methodRef != null ) { return methodRef . get ( ) ; } } return null ; } | Return the method from the cache if present . |
14,546 | private static void cacheMethod ( MethodDescriptor md , Method method ) { if ( CACHE_METHODS ) { if ( method != null ) { cache . put ( md , new WeakReference < Method > ( method ) ) ; } } } | Add a method to the cache . |
14,547 | public static int findRow ( DenseMatrix64F m , double ... row ) { int cols = m . numCols ; if ( row . length != cols ) { throw new IllegalArgumentException ( "illegal column count" ) ; } double [ ] d = m . data ; int rows = m . numRows ; for ( int r = 0 ; r < rows ; r ++ ) { boolean eq = true ; for ( int c = 0 ; c < cols ; c ++ ) { if ( d [ cols * r + c ] != row [ c ] ) { eq = false ; break ; } } if ( eq ) { return r ; } } return - 1 ; } | Returns found row number or - 1 . |
14,548 | public static void removeEqualRows ( DenseMatrix64F matrix ) { int rows = matrix . numRows ; if ( rows < 2 ) { return ; } double [ ] d = matrix . data ; int cols = matrix . numCols ; int left = rows - 1 ; int delta = 0 ; for ( int i = 0 ; i < left ; i ++ ) { int j = i ; for ( ; j < left && eq ( d , i , j + 1 , cols ) ; j ++ ) ; if ( i != j ) { int cnt = j - i ; System . arraycopy ( d , cols * j , d , cols * i , cols * ( left - j + 1 ) ) ; left -= cnt ; delta += cnt ; } } if ( eq ( d , 0 , rows - 1 , cols ) ) { delta ++ ; } if ( delta > 0 ) { matrix . reshape ( rows - delta , cols , true ) ; } } | Removes equal subsequent rows and additionally last row if it is equal to first row . |
14,549 | public static void sort ( DenseMatrix64F matrix , RowComparator comparator ) { int len = matrix . numCols ; quickSort ( matrix . data , 0 , matrix . numRows - 1 , len , comparator , new double [ len ] , new double [ len ] ) ; } | MatrixSort is able to sort matrix rows when matrix is stored in one dimensional array as in DenseMatrix64F . |
14,550 | public static boolean validateDateFormat ( String date , Locale locale ) { SimpleDateFormat df ; SimpleDateFormat sdf ; java . text . ParsePosition pos ; java . util . Date dbDate ; dbDate = null ; try { if ( date == null || date . equals ( "" ) ) { return false ; } df = ( SimpleDateFormat ) DateFormat . getDateInstance ( dateStyle , locale ) ; sdf = new SimpleDateFormat ( df . toPattern ( ) ) ; pos = new java . text . ParsePosition ( 0 ) ; sdf . setLenient ( false ) ; dbDate = sdf . parse ( date , pos ) ; return dbDate != null && dbDate . getTime ( ) > 0L ; } catch ( Exception e ) { return false ; } } | Validates the users inputted date value |
14,551 | public static java . sql . Date convertDate ( String date , Locale locale ) { SimpleDateFormat df ; java . util . Date dbDate = null ; java . sql . Date sqldate = null ; try { if ( date == null || date . equals ( "" ) ) { return null ; } df = ( SimpleDateFormat ) DateFormat . getDateInstance ( dateStyle , locale ) ; SimpleDateFormat sdf = new SimpleDateFormat ( df . toPattern ( ) ) ; java . text . ParsePosition pos = new java . text . ParsePosition ( 0 ) ; sdf . setLenient ( false ) ; dbDate = sdf . parse ( date , pos ) ; return new java . sql . Date ( dbDate . getTime ( ) ) ; } catch ( Exception e ) { return null ; } } | Converts the users input date value to java . sql . Date |
14,552 | public void updateFields ( Record record , BaseMessage message , boolean bUpdateOnlyIfFieldNotModified ) { String strField = ( String ) message . get ( DBParams . FIELD ) ; if ( MULTIPLE_FIELDS . equalsIgnoreCase ( strField ) ) { for ( int iFieldSeq = 0 ; iFieldSeq < record . getFieldCount ( ) ; iFieldSeq ++ ) { BaseField field = record . getField ( iFieldSeq ) ; Object objFieldNameValue = message . get ( field . getFieldName ( ) ) ; if ( objFieldNameValue != null ) if ( ( ! bUpdateOnlyIfFieldNotModified ) || ( ! field . isModified ( ) ) ) { if ( objFieldNameValue instanceof String ) field . setString ( ( String ) objFieldNameValue ) ; else { try { objFieldNameValue = Converter . convertObjectToDatatype ( objFieldNameValue , field . getDataClass ( ) , null ) ; } catch ( Exception ex ) { objFieldNameValue = null ; } field . setData ( objFieldNameValue ) ; } } } } else { String strValue = ( String ) message . get ( DBParams . VALUE ) ; BaseField field = record . getField ( strField ) ; if ( field != null ) if ( ( ! bUpdateOnlyIfFieldNotModified ) || ( ! field . isModified ( ) ) ) field . setString ( strValue ) ; } } | Update the fields in this record using this property object . |
14,553 | public void printXML ( HttpServletRequest req , PrintWriter out ) { ServletTask task = ( ServletTask ) this . getTask ( ) ; Map < String , Object > properties = task . getRequestProperties ( task . getServletRequest ( ) , true ) ; CreateWSDL wsdl = null ; if ( "2.0" . equalsIgnoreCase ( this . getProperty ( WSDL_VERSION ) ) ) wsdl = new CreateWSDL20 ( task , null , properties ) ; else wsdl = new CreateWSDL11 ( task , null , properties ) ; Object data = wsdl . createMarshallableObject ( ) ; String xml = wsdl . getXML ( data ) ; out . println ( xml ) ; wsdl . free ( ) ; } | PrintXML Method . |
14,554 | public void dispose ( final Session session ) { if ( session != null && session . isConnected ( ) ) { logger . trace ( "Disposing of hibernate session." ) ; session . close ( ) ; } } | Dispose of a hibernate session . |
14,555 | public static LinkedBindingBuilder < Module > bindJacksonModule ( final Binder binder ) { final Multibinder < Module > moduleBinder = Multibinder . newSetBinder ( binder , Module . class , JACKSON_NAMED ) ; return moduleBinder . addBinding ( ) ; } | Bind a Jackson module to the object mapper . |
14,556 | public static LinkedBindingBuilder < Boolean > bindJacksonOption ( final Binder binder , final Enum < ? > option ) { final MapBinder < Enum < ? > , Boolean > optionBinder = MapBinder . newMapBinder ( binder , new TypeLiteral < Enum < ? > > ( ) { } , new TypeLiteral < Boolean > ( ) { } , JACKSON_NAMED ) ; return optionBinder . addBinding ( option ) ; } | Set a Jackson feature on the Object Mapper . |
14,557 | public static EnterpriseArchive createEARDeployment ( ) { final EnterpriseArchive ear = ShrinkWrap . create ( EnterpriseArchive . class , "scribble-test.ear" ) ; final PomEquippedResolveStage pom = Maven . configureResolver ( ) . workOffline ( ) . loadPomFromFile ( "pom.xml" ) ; final File [ ] files = pom . importDependencies ( ScopeType . COMPILE ) . resolve ( ) . withTransitivity ( ) . asFile ( ) ; for ( final File f : files ) { if ( f . getName ( ) . endsWith ( ".jar" ) ) { LOG . debug ( "Adding lib {}" , f ) ; ear . addAsLibrary ( f ) ; } } return ear ; } | Creates an enterprise archive for the module in whose working directory the method is invoked including all compile - scoped jar archives . |
14,558 | public static WebArchive createJackrabbitCDI10Webapp ( ) { final File jackrabbitWarFile = Maven . resolver ( ) . loadPomFromFile ( "pom.xml" ) . resolve ( "org.apache.jackrabbit:jackrabbit-webapp:war:?" ) . withTransitivity ( ) . asSingleFile ( ) ; final File guava15CDIJarFile = Maven . resolver ( ) . loadPomFromFile ( "pom.xml" ) . resolve ( "com.google.guava:guava:jar:cdi1.0:15.0" ) . withTransitivity ( ) . asSingleFile ( ) ; final URL webXml = ScribbleShrinkwrapHelper . class . getResource ( "jackrabbit_webapp_web.xml" ) ; final WebArchive jackrabbitWar = ShrinkWrap . createFromZipFile ( WebArchive . class , jackrabbitWarFile ) . setWebXML ( webXml ) . addAsLibraries ( guava15CDIJarFile ) ; jackrabbitWar . delete ( "/WEB-INF/lib/guava-15.0.jar" ) ; return jackrabbitWar ; } | Creates a Jackrabbit WebArchive for a CDI 1 . 0 container that may be deployed along with the web app under test . The jackrabbit web app uses a customized web . xml to provide a repository that is available as JNDI resource . |
14,559 | public static < U > LifecycleProvider < U > of ( final Class < ? extends Provider < U > > providerClass ) { return new DelegatingLifecycleProvider < U > ( providerClass , null ) ; } | Returns a LifecycleProvider that delegates to an existing provider . The provider is managed by Guice and injected . |
14,560 | public static < U > LifecycleProvider < U > of ( final Provider < U > delegate ) { return new DelegatingLifecycleProvider < U > ( null , delegate ) ; } | Returns a LifecycleProvider that delegates to an existing provider instance . |
14,561 | public boolean configure ( final FeatureContext context ) { context . register ( new HibernateSessionFactory . Binder ( ) ) ; context . register ( new HibernateSessionFactoryFactory . Binder ( ) ) ; context . register ( new HibernateServiceRegistryFactory . Binder ( ) ) ; context . register ( new FulltextSearchFactoryFactory . Binder ( ) ) ; context . register ( new FulltextSessionFactory . Binder ( ) ) ; return true ; } | Register the HibernateFeature with the current application context . |
14,562 | public static Object getCastingValue ( ColumnType columnType , Object value ) throws ExecutionException { validateInput ( columnType ) ; Object returnValue = null ; if ( value != null ) { switch ( columnType . getDataType ( ) ) { case BIGINT : ensureNumber ( value ) ; returnValue = ( ( Number ) value ) . longValue ( ) ; break ; case DOUBLE : ensureNumber ( value ) ; returnValue = ( ( Number ) value ) . doubleValue ( ) ; break ; case FLOAT : ensureNumber ( value ) ; returnValue = ( ( Number ) value ) . floatValue ( ) ; break ; case INT : ensureNumber ( value ) ; returnValue = ( ( Number ) value ) . intValue ( ) ; break ; default : returnValue = value ; } } return returnValue ; } | Return a casting value adapt to columntType . |
14,563 | private static void validateInput ( ColumnType columnType ) throws ExecutionException { if ( columnType == null ) { String messagge = "The ColumnType can not be null." ; LOGGER . error ( messagge ) ; throw new ExecutionException ( messagge ) ; } } | This method validate the Input . |
14,564 | private static void ensureNumber ( Object value ) throws ExecutionException { if ( ! isNumber ( value ) ) { String message = value . getClass ( ) . getCanonicalName ( ) + " can not cast to a Number." ; LOGGER . error ( message ) ; throw new ExecutionException ( message ) ; } } | Ensure if a object is a number . |
14,565 | public void connect ( ICredentials credentials , ConnectorClusterConfig config ) throws ConnectionException { logger . info ( "Conecting connector [" + this . getClass ( ) . getSimpleName ( ) + "]" ) ; connectionHandler . createConnection ( credentials , config ) ; } | Create a logical connection . |
14,566 | public void close ( ClusterName clusterName ) { logger . info ( "Close connection to cluster [" + clusterName + "] from connector [" + this . getClass ( ) . getSimpleName ( ) + "]" ) ; connectionHandler . closeConnection ( clusterName . getName ( ) ) ; } | It close the logical connection . |
14,567 | public static < E extends Comparable < E > > boolean isSorted ( E [ ] array ) { for ( int i = 0 ; i < array . length - 1 ; i ++ ) { if ( array [ i ] . compareTo ( array [ i + 1 ] ) > 0 ) { return false ; } } return true ; } | Check if the array is sorted . It loops through the entire array once checking that the elements are sorted . |
14,568 | public static < E extends Comparable < E > > boolean isSorted ( List < E > list ) { for ( int i = 0 ; i < list . size ( ) - 1 ; i ++ ) { if ( list . get ( i ) . compareTo ( list . get ( i + 1 ) ) > 0 ) { return false ; } } return true ; } | Check if the list is sorted . It loops through the entire list once checking that the elements are sorted . |
14,569 | public static boolean isSorted ( int [ ] intArray ) { for ( int i = 0 ; i < intArray . length - 1 ; i ++ ) { if ( intArray [ i ] > intArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the integer array is sorted . It loops through the entire integer array once checking that the elements are sorted . |
14,570 | public static boolean isReverseSorted ( int [ ] intArray ) { for ( int i = 0 ; i < intArray . length - 1 ; i ++ ) { if ( intArray [ i ] < intArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the integer array is reverse sorted . It loops through the entire integer array once checking that the elements are reverse sorted . |
14,571 | public static boolean isSorted ( byte [ ] byteArray ) { for ( int i = 0 ; i < byteArray . length - 1 ; i ++ ) { if ( byteArray [ i ] > byteArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the byte array is sorted . It loops through the entire byte array once checking that the elements are sorted . |
14,572 | public static boolean isReverseSorted ( byte [ ] byteArray ) { for ( int i = 0 ; i < byteArray . length - 1 ; i ++ ) { if ( byteArray [ i ] < byteArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the byte array is reverse sorted . It loops through the entire byte array once checking that the elements are reverse sorted . |
14,573 | public static boolean isSorted ( char [ ] charArray ) { for ( int i = 0 ; i < charArray . length - 1 ; i ++ ) { if ( charArray [ i ] > charArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the char array is sorted . It loops through the entire char array once checking that the elements are sorted . |
14,574 | public static boolean isReverseSorted ( char [ ] charArray ) { for ( int i = 0 ; i < charArray . length - 1 ; i ++ ) { if ( charArray [ i ] < charArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the char array is reverse sorted . It loops through the entire char array once checking that the elements are reverse sorted . |
14,575 | public static boolean isSorted ( double [ ] doubleArray ) { for ( int i = 0 ; i < doubleArray . length - 1 ; i ++ ) { if ( doubleArray [ i ] > doubleArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the double array is sorted . It loops through the entire double array once checking that the elements are sorted . |
14,576 | public static boolean isReverseSorted ( double [ ] doubleArray ) { for ( int i = 0 ; i < doubleArray . length - 1 ; i ++ ) { if ( doubleArray [ i ] < doubleArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the double array is reverse sorted . It loops through the entire double array once checking that the elements are reverse sorted . |
14,577 | public static boolean isSorted ( float [ ] floatArray ) { for ( int i = 0 ; i < floatArray . length - 1 ; i ++ ) { if ( floatArray [ i ] > floatArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the float array is sorted . It loops through the entire float array once checking that the elements are sorted . |
14,578 | public static boolean isReverseSorted ( float [ ] floatArray ) { for ( int i = 0 ; i < floatArray . length - 1 ; i ++ ) { if ( floatArray [ i ] < floatArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the float array is reverse sorted . It loops through the entire float array once checking that the elements are reverse sorted . |
14,579 | public static boolean isSorted ( long [ ] longArray ) { for ( int i = 0 ; i < longArray . length - 1 ; i ++ ) { if ( longArray [ i ] > longArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the long array is sorted . It loops through the entire long array once checking that the elements are sorted . |
14,580 | public static boolean isReverseSorted ( long [ ] longArray ) { for ( int i = 0 ; i < longArray . length - 1 ; i ++ ) { if ( longArray [ i ] < longArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the long array is reverse sorted . It loops through the entire long array once checking that the elements are reverse sorted . |
14,581 | public static boolean isSorted ( short [ ] shortArray ) { for ( int i = 0 ; i < shortArray . length - 1 ; i ++ ) { if ( shortArray [ i ] > shortArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the short array is sorted . It loops through the entire short array once checking that the elements are sorted . |
14,582 | public static boolean isReverseSorted ( short [ ] shortArray ) { for ( int i = 0 ; i < shortArray . length - 1 ; i ++ ) { if ( shortArray [ i ] < shortArray [ i + 1 ] ) { return false ; } } return true ; } | Check if the short array is reverse sorted . It loops through the entire short array once checking that the elements are reverse sorted . |
14,583 | public String getMainAttribute ( String attributeName , String defaultValue ) { Attributes attributes = this . manifest . getMainAttributes ( ) ; String attributeValue = ( attributes != null ? attributes . getValue ( attributeName ) : null ) ; return ( attributeValue != null ? attributeValue : defaultValue ) ; } | Gets a manifest s main attribute . |
14,584 | public static < T > Specification < T > and ( Specification < T > lhs , Specification < ? super T > rhs ) { return new AndSpecification < T > ( lhs , rhs ) ; } | Returns a specification expecting that the two given specifications are satisfied . |
14,585 | public static < T > Specification < T > or ( Specification < T > lhs , Specification < ? super T > rhs ) { return new OrSpecification < T > ( lhs , rhs ) ; } | Returns a specification expecting that at least one of the two specifications is satisfied . |
14,586 | public static < T > Specification < T > not ( Specification < T > proposition ) { return new NotSpecification < T > ( proposition ) ; } | Returns a specification expecting that the given specification is not satisfied . |
14,587 | public CalendarItem getFieldListProxy ( FieldList fieldList ) { return new CalendarItemFieldListProxy ( fieldList , m_strStartDateTimeField , m_strEndDateTimeField , m_strDescriptionField , m_strStatusField ) ; } | Create a CalendarItem Proxy using this field list . Usually you use CalendarItemFieldListProxy or override it . |
14,588 | public void fireTableRowSelected ( Object source , int iRowIndex , int iSelectionType ) { this . fireMySelectionChanged ( new MyListSelectionEvent ( source , this , iRowIndex , iSelectionType ) ) ; } | Notify listeners this row is selected ; pass a - 1 to de - select all rows . |
14,589 | protected void fireMySelectionChanged ( MyListSelectionEvent event ) { this . selectionChanged ( event . getSource ( ) , event . getRow ( ) , event . getRow ( ) , event . getType ( ) ) ; Object [ ] listeners = listenerList . getListenerList ( ) ; for ( int i = listeners . length - 2 ; i >= 0 ; i -= 2 ) { if ( listeners [ i ] == MyListSelectionListener . class ) if ( listeners [ i ] != event . getSource ( ) ) { ( ( MyListSelectionListener ) listeners [ i + 1 ] ) . selectionChanged ( event ) ; } } } | Notify all listeners that have registered interest for notification on this event type . The event instance is lazily created using the parameters passed into the fire method . |
14,590 | public void clear ( ) { for ( T obj : items ) obj . setDRIndex ( null ) ; items . clear ( ) ; } | Removes all annotation instances from the store setting their drIndex values to null in the process . |
14,591 | public T create ( final Class < T > klass ) { T obj ; try { obj = ( T ) klass . newInstance ( ) ; } catch ( IllegalAccessException e ) { throw new DocrepException ( e ) ; } catch ( InstantiationException e ) { throw new DocrepException ( e ) ; } add ( obj ) ; return obj ; } | Creates a new annotation instance adds it to the store and returns the instance . This is simply a convenience method to save the user from creating and adding to the store separately . |
14,592 | public void create ( final Class < T > klass , final int n ) { for ( int i = 0 ; i != n ; i ++ ) create ( klass ) ; } | Creates n new annotation instances adding them all to the store . |
14,593 | public static HandshakeMessage getDefaultMessage ( ) { HandshakeMessage message = new HandshakeMessage ( ) ; message . setProtocolString ( HandshakeMessage . PROTOCOL_STRING ) ; message . setReservedBits ( HandshakeMessage . PROTOCOL_RESERVED_BITS ) ; message . setStringLength ( HandshakeMessage . PROTOCOL_STRING_LENGTH ) ; message . setVersionNumber ( HandshakeMessage . PROTOCOL_VERSION ) ; return message ; } | Generates a basic handshake message according to the most recent protocol definition . |
14,594 | public void setProtocolString ( String protocolString ) { this . protocolString = protocolString ; if ( protocolString != null ) { try { this . stringLength = protocolString . getBytes ( "US-ASCII" ) . length ; } catch ( UnsupportedEncodingException uee ) { this . stringLength = 0 ; log . error ( "Couldn't encode to US-ASCII." , uee ) ; } } else { this . stringLength = 0 ; } } | Sets the protocol string for this handshake message . |
14,595 | @ XmlElement ( name = "pageRequest" , required = true ) @ JsonProperty ( value = "pageRequest" , required = true ) @ ApiModelProperty ( value = "The page request." , position = 1 , required = true ) public PageRequestDto getPageRequest ( ) { if ( this . pageRequest == null ) { this . pageRequest = new PageRequestDto ( ) ; } return pageRequest ; } | Returns the page request . |
14,596 | @ XmlElement ( name = "totalSize" , required = true ) @ JsonProperty ( value = "totalSize" , required = true ) @ ApiModelProperty ( value = "The total size of available elements." , position = 2 , required = true ) public long getTotalSize ( ) { return totalSize ; } | Returns the size of all available elements . |
14,597 | @ XmlElement ( name = "totalPages" , required = true ) @ JsonProperty ( value = "totalPages" , required = true ) @ ApiModelProperty ( value = "The total size of available pages." , position = 3 , required = true , readOnly = true ) public int getTotalPages ( ) { if ( getTotalSize ( ) <= 0L ) { return 1 ; } return ( int ) Math . ceil ( ( double ) getTotalSize ( ) / ( double ) getPageRequest ( ) . getPageSize ( ) ) ; } | Returns the number of all pages . |
14,598 | public void register ( BridgeFactory bridgeFactory ) { Class < ? > nearType = bridgeFactory . getNearType ( ) ; Class < ? > farType = bridgeFactory . getFarType ( ) ; logger . trace ( display ( nearType ) + ": " + display ( farType ) ) ; nearToFarType . put ( nearType , farType ) ; farToNearType . put ( farType , nearType ) ; nearTypeToFactory . put ( nearType , bridgeFactory ) ; farTypeToFactory . put ( farType , bridgeFactory ) ; if ( accessors . containsKey ( nearType ) ) { for ( FactoryAccessor < ? > accessor : accessors . get ( nearType ) ) { injectInto ( accessor ) ; } accessors . remove ( nearType ) ; } } | Registers the given bridge factory and its bridge head types . |
14,599 | public Class < ? > getFarType ( Class < ? > nearType ) { if ( ! nearToFarType . containsKey ( nearType ) ) { throw new IllegalStateException ( "Near type not registered: " + ( nearType == null ? "null" : nearType . getSimpleName ( ) ) ) ; } return nearToFarType . get ( nearType ) ; } | Returns the far type that corresponds to the given near type . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.