idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
16,000 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public void runThread ( Object objJobDef ) { if ( objJobDef instanceof Task ) { Task task = ( Task ) objJobDef ; if ( task . getApplication ( ) == null ) task . initTask ( this . getApplication ( ) , null ) ; task . run ( ) ; } else if ( ( objJobDef instanceof String ... | Start this task running in this thread . |
16,001 | public static SyncWorker startPageWorker ( SyncPage syncPage , SyncNotify syncNotify , Runnable swingPageLoader , Map < String , Object > map , boolean bManageCursor ) { SyncWorker syncWorker = ( SyncWorker ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( JAVA_WORKER ) ; if ( syncWorker == null )... | Start a task that calls the syncNotify done method when the screen is done displaying . This class is a platform - neutral implementation of SwinSyncPageWorker that guarantees a page has displayed before doing a compute - intensive task . |
16,002 | private FieldTextBuilder binaryOperation ( final String operator , final FieldText fieldText ) { Validate . isTrue ( fieldText != this ) ; if ( fieldText instanceof FieldTextBuilder ) { return binaryOp ( operator , ( FieldTextBuilder ) fieldText ) ; } if ( componentCount == 0 ) { fieldTextString . append ( fieldText . ... | Does the work for the OR AND XOR and WHEN methods . |
16,003 | private FieldTextBuilder binaryOp ( final String operator , final FieldTextBuilder fieldText ) { if ( componentCount == 0 ) { fieldTextString . append ( fieldText . fieldTextString ) ; lastOperator = fieldText . lastOperator ; not = fieldText . not ; componentCount = fieldText . componentCount ; } else { addOperator ( ... | Does the work for the OR AND and XOR methods in the optimized case where fieldText is a FieldTextBuilder . |
16,004 | private void addOperator ( final String operator ) { Validate . notNull ( operator ) ; if ( lastOperator == null ) { lastOperator = operator ; } if ( not ) { if ( componentCount == 1 ) { fieldTextString . insert ( 0 , "NOT+" ) ; } else { fieldTextString . insert ( 0 , "NOT(" ) . append ( ')' ) ; } } else if ( ! lastOpe... | The first section of the fieldtext manipulation process where the NOTs are handled and the operator is added are common to both binaryOp methods so this method saves us repeating the code . |
16,005 | public void init ( App app , Rec record , Map < String , Object > properties ) { m_app = app ; } | Creates new RmiSessionServer . |
16,006 | public static RemoteSessionServer startupServer ( Map < String , Object > properties ) { RemoteSessionServer remoteServer = null ; Utility . getLogger ( ) . info ( "Starting RemoteSession server" ) ; try { remoteServer = new RemoteSessionServer ( null , null , null ) ; } catch ( RemoteException ex ) { ex . printStackTr... | Start up the remote server . |
16,007 | public void shutdown ( ) { Environment env = ( ( BaseApplication ) m_app ) . getEnvironment ( ) ; if ( m_app != null ) m_app . free ( ) ; m_app = null ; if ( ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) != null ) ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) . shutdownServic... | Shutdown the server . |
16,008 | public void addListener ( final LifecycleStage lifecycleStage , final LifecycleListener lifecycleListener ) { if ( ! listeners . containsKey ( lifecycleStage ) ) { throw illegalStage ( lifecycleStage ) ; } listeners . get ( lifecycleStage ) . add ( lifecycleListener ) ; } | Adds a listener to a lifecycle stage . |
16,009 | public void executeNext ( ) { final LifecycleStage nextStage = getNextStage ( ) ; if ( nextStage == null ) { throw new IllegalStateException ( "Lifecycle already hit the final stage!" ) ; } execute ( nextStage ) ; } | Execute the next stage in the cycle . |
16,010 | public void execute ( final LifecycleStage lifecycleStage ) { List < LifecycleListener > lifecycleListeners = listeners . get ( lifecycleStage ) ; if ( lifecycleListeners == null ) { throw illegalStage ( lifecycleStage ) ; } log ( "Stage '%s' starting..." , lifecycleStage . getName ( ) ) ; if ( lifecycleStage . equals ... | Execute a lifecycle stage . |
16,011 | protected void join ( final LifecycleStage lifecycleStage , final boolean cycle ) throws InterruptedException { Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ) { public void run ( ) { if ( cycle ) { AbstractLifecycle . this . executeTo ( lifecycleStage ) ; } else { AbstractLifecycle . this . execute ( lifec... | Register a shutdown hook to execute the given stage on JVM shutdown and join against the current thread . This will block so there needs to be a another way to shut the current thread down . |
16,012 | public void setArguments ( Object ... arguments ) { Params . notNullOrEmpty ( arguments , "Arguments" ) ; this . arguments = arguments ; argumentsWriter = ClientEncoders . getInstance ( ) . getArgumentsWriter ( arguments ) ; } | Set remote method invocation actual parameters . Parameters order and types should be consistent with remote method signature . |
16,013 | public void setExceptions ( Class < ? > [ ] exceptions ) { for ( Class < ? > exception : exceptions ) { this . exceptions . add ( exception . getSimpleName ( ) ) ; } } | Set method exceptions list . This exceptions list is used by the logic that handle remote exception . It should be consistent with remote method signature . |
16,014 | private Object exec ( ) throws Exception { boolean exception = false ; try { return exec ( connection ) ; } catch ( Throwable t ) { log . dump ( String . format ( "Error processing HTTP-RMI |%s|." , connection . getURL ( ) ) , t ) ; exception = true ; throw t ; } finally { if ( exception || CONNECTION_CLOSE . equals ( ... | Executes transaction and returns remote value . Takes care to disconnect connection if server response has close header ; also disconnect on any kind of error . |
16,015 | private Object exec ( HttpURLConnection connection ) throws Exception { connection . setConnectTimeout ( connectionTimeout ) ; connection . setReadTimeout ( readTimeout ) ; connection . setRequestMethod ( arguments == null ? "GET" : "POST" ) ; connection . setRequestProperty ( "User-Agent" , "j(s)-lib/1.9.3" ) ; connec... | Execute synchronous remote method invocation using given HTTP connection . |
16,016 | private void onError ( int statusCode ) throws Exception { switch ( statusCode ) { case SC_FORBIDDEN : throw new RmiException ( "Server refuses to process request |%s|. Common cause may be Tomcat filtering by remote address and this IP is not allowed." , connection . getURL ( ) ) ; case SC_UNAUTHORIZED : throw new RmiE... | Handle transaction error . |
16,017 | private static Object readJsonObject ( InputStream stream , Type type ) throws IOException { BufferedReader reader = null ; Json json = Classes . loadService ( Json . class ) ; try { reader = Files . createBufferedReader ( stream ) ; return json . parse ( reader , type ) ; } finally { if ( reader != null ) { reader . c... | Read JSON object from input stream and return initialized object instance . |
16,018 | public void loadProperties ( String prefix ) { List < Property > props = null ; try { props = getListByPrefix ( prefix ) ; } catch ( Exception e ) { log . error ( "Error retrieving properties with prefix: " + prefix , e ) ; return ; } for ( Property prop : props ) { if ( prop . getName ( ) != null ) { this . properties... | Loads all property objects beginning with the specified prefix . The property objects are stored in a map indexed by the property name for easy retrieval . |
16,019 | public int getValue ( String name , String [ ] choices ) { String val = getValue ( name , "" ) ; int index = Arrays . asList ( choices ) . indexOf ( val ) ; return index == - 1 ? 0 : index ; } | Returns the index of a property value as it occurs in the choice list . |
16,020 | public boolean getValue ( String name , boolean dflt ) { try { String val = getValue ( name , Boolean . toString ( dflt ) ) . toLowerCase ( ) ; return val . startsWith ( "y" ) ? true : Boolean . parseBoolean ( val ) ; } catch ( Exception e ) { return false ; } } | Returns a boolean property value . |
16,021 | public int getValue ( String name , int dflt ) { try { return Integer . parseInt ( getValue ( name , Integer . toString ( dflt ) ) ) ; } catch ( Exception e ) { return dflt ; } } | Returns an integer property value . |
16,022 | public String getValue ( String name , String dflt ) { Property prop = getProperty ( name ) ; return prop == null ? dflt : prop . getValue ( ) ; } | Returns a string property value . |
16,023 | public void printInputControl ( PrintWriter out , String strFieldDesc , String strFieldName , String strSize , String strMaxSize , String strValue , String strControlType , String strFieldType ) { out . println ( " <xfm:" + strControlType + " xform=\"form1\" ref=\"" + strFieldName + "\" cols=\"" + strSize + "\" type=\"... | Display this field in XML input format . |
16,024 | JsonRepresentation asEventRepr ( EventMetadata metadata , final JsonRepresentation payloadRepr ) { final JsonRepresentation eventRepr = JsonRepresentation . newMap ( ) ; final JsonRepresentation metadataRepr = JsonRepresentation . newMap ( ) ; eventRepr . mapPut ( "metadata" , metadataRepr ) ; metadataRepr . mapPut ( "... | region > supporting methods |
16,025 | public void updateResourcePermissions ( ) { UserPermission recUserPermission = new UserPermission ( this . getOwner ( ) . findRecordOwner ( ) ) ; recUserPermission . addListener ( new SubFileFilter ( this . getOwner ( ) ) ) ; try { while ( recUserPermission . hasNext ( ) ) { recUserPermission . next ( ) ; recUserPermis... | UpdateResourcePermissions Method . |
16,026 | public void run ( ) { Object objJobDef = null ; while ( m_bKeepAlive ) { Date earliestDate = null ; Vector < AutoTask > vJobsToRunLater = null ; while ( ( objJobDef = this . getNextJob ( ) ) != null ) { if ( EMPTY_TIMED_JOBS == objJobDef ) { vJobsToRunLater = null ; earliestDate = null ; } else if ( END_OF_JOBS == objJ... | Run this thread . |
16,027 | public boolean sameJob ( AutoTask jobAtIndex , AutoTask jobToAdd ) { Map < String , Object > propJobAtIndex = jobAtIndex . getProperties ( ) ; Map < String , Object > propJobToAdd = jobToAdd . getProperties ( ) ; if ( propJobAtIndex . size ( ) != propJobToAdd . size ( ) ) return false ; boolean bSameJob = false ; for (... | Do these two jobs match? |
16,028 | public static JMessageListener createScreenMessageListener ( FieldList record , BaseScreenModel screen ) { FieldTable table = record . getTable ( ) ; RemoteSession remoteSession = ( RemoteSession ) table . getRemoteTableType ( org . jbundle . model . Remote . class ) ; MessageManager messageManager = ( ( Application ) ... | Create a screen message listener for this screen . |
16,029 | public String processPortType ( TDefinitions descriptionType , TPortType interfaceType , boolean addAddress ) { String interfaceName = interfaceType . getName ( ) ; String allAddress = DBConstants . BLANK ; for ( TOperation nextElement : interfaceType . getOperation ( ) ) { { String address = this . processInterfaceOpe... | ProcessPortType Method . |
16,030 | public String getElementNameFromMessageName ( TDefinitions descriptionType , TParam message ) { QName qName = message . getMessage ( ) ; String name = qName . getLocalPart ( ) ; for ( TDocumented nextElement : descriptionType . getAnyTopLevelOptionalElement ( ) ) { if ( nextElement instanceof TMessage ) { String msgNam... | Search through the messages for this one and return the element name . |
16,031 | private void init ( IESigType eSigType ) { List < ESigItem > list = new ArrayList < > ( ) ; eSigType . loadESigItems ( list ) ; eSigList . addAll ( list ) ; } | Initialize a new esig type . |
16,032 | public boolean exist ( IESigType esigType , String id ) { return eSigList . indexOf ( esigType , id ) >= 0 ; } | Tests if the esig item of the specified type and unique id exists . |
16,033 | public void remove ( IESigType esigType , String id ) { eSigList . remove ( esigType , id ) ; } | Removes the item of the specified type and id from the list . |
16,034 | public void register ( IESigType eSigType ) throws Exception { if ( typeRegistry . get ( eSigType . getESigTypeId ( ) ) != null ) { throw new Exception ( "Duplicate esig type identifier: " + eSigType . getESigTypeId ( ) ) ; } typeRegistry . put ( eSigType . getESigTypeId ( ) , eSigType ) ; init ( eSigType ) ; } | Registers a new esig type . If a type with the same mnemonic id is already registered an exception is thrown . |
16,035 | public static void compare ( final IFileCompareResultBean fileCompareResultBean , final boolean ignoreAbsolutePathEquality , final boolean ignoreExtensionEquality , final boolean ignoreLengthEquality , final boolean ignoreLastModified , final boolean ignoreNameEquality ) { final File source = fileCompareResultBean . ge... | Sets the flags in the FileCompareResultBean object according to the given boolean flag what to ignore . |
16,036 | public static void compare ( final IFileContentResultBean fileContentResultBean , final boolean ignoreAbsolutePathEquality , final boolean ignoreExtensionEquality , final boolean ignoreLengthEquality , final boolean ignoreLastModified , final boolean ignoreNameEquality , final boolean ignoreContentEquality ) { compare ... | Sets the flags in the FileContentResultBean object according to the given boolean flag what to ignore . |
16,037 | public static IFileContentResultBean compareFileContentByBytes ( final File sourceFile , final File fileToCompare ) { final IFileContentResultBean fileContentResultBean = new FileContentResultBean ( sourceFile , fileToCompare ) ; completeCompare ( fileContentResultBean ) ; final boolean simpleEquality = validateEqualit... | Compare file content for every single byte . |
16,038 | public static IFileContentResultBean compareFileContentByLines ( final File sourceFile , final File fileToCompare ) { final IFileContentResultBean fileContentResultBean = new FileContentResultBean ( sourceFile , fileToCompare ) ; completeCompare ( fileContentResultBean ) ; final boolean simpleEquality = validateEqualit... | Compare file content by lines . |
16,039 | public static void completeCompare ( final IFileCompareResultBean fileCompareResultBean ) { compare ( fileCompareResultBean , false , false , false , false , false ) ; } | Completes the compare from the files encapsulated in the FileCompareResultBean . |
16,040 | public static List < IFileCompareResultBean > findEqualFiles ( final File dirToSearch ) { final List < File > allFiles = FileSearchExtensions . findFilesRecursive ( dirToSearch , "*" ) ; final List < IFileCompareResultBean > equalFiles = new ArrayList < > ( ) ; for ( int i = 0 ; i < allFiles . size ( ) ; i ++ ) { final... | Find equal files . |
16,041 | public static List < IFileCompareResultBean > findEqualFiles ( final File source , final File compare ) { final List < File > allSourceFiles = FileSearchExtensions . findFilesRecursive ( source , "*" ) ; final List < File > allCompareFiles = FileSearchExtensions . findFilesRecursive ( compare , "*" ) ; final List < IFi... | Find equal files from the given directories . |
16,042 | public static List < IFileContentResultBean > findEqualFilesWithSameContent ( final File dirToSearch ) { final List < IFileContentResultBean > equalFiles = new ArrayList < IFileContentResultBean > ( ) ; final List < File > allFiles = FileSearchExtensions . findFilesRecursive ( dirToSearch , "*" ) ; for ( int i = 0 ; i ... | Compare files with the same content . |
16,043 | public static IFileCompareResultBean simpleCompareFiles ( final File sourceFile , final File fileToCompare ) { return compareFiles ( sourceFile , fileToCompare , true , false , false , true , false ) ; } | Simple comparing the given files . |
16,044 | public static boolean validateEquality ( final IFileCompareResultBean fileCompareResultBean ) { return fileCompareResultBean . getFileExtensionEquality ( ) && fileCompareResultBean . getLengthEquality ( ) && fileCompareResultBean . getLastModifiedEquality ( ) && fileCompareResultBean . getNameEquality ( ) ; } | Validates the files encapsulated in the IFileCompareResultBean for simple equality . This means like if they have equal file extension length last modified and filenames . |
16,045 | public static boolean validateEquality ( final IFileContentResultBean fileContentResultBean ) { return fileContentResultBean . getFileExtensionEquality ( ) && fileContentResultBean . getLengthEquality ( ) && fileContentResultBean . getLastModifiedEquality ( ) && fileContentResultBean . getNameEquality ( ) && fileConten... | Validates the files encapsulated in the IFileCompareResultBean for total equality . This means like if they have equal file extension length last modified filenames and content . |
16,046 | public boolean canSign ( boolean selectedOnly ) { for ( ESigItem item : items ) { if ( ( ! selectedOnly || item . isSelected ( ) ) && ( item . getSignState ( ) != SignState . FORCED_NO ) ) { return true ; } } return false ; } | Returns true if items exist that the user may sign . |
16,047 | public int getCount ( IESigType eSigType ) { int result = 0 ; for ( ESigItem item : items ) { if ( item . getESigType ( ) . equals ( eSigType ) ) { result ++ ; } } return result ; } | Returns the count of items of the specified type . |
16,048 | public int indexOf ( IESigType eSigType , String id ) { return items . indexOf ( new ESigItem ( eSigType , id ) ) ; } | Returns the index of a sig item identified by type and id . |
16,049 | public ESigItem get ( IESigType eSigType , String id ) { int i = indexOf ( eSigType , id ) ; return i == - 1 ? null : items . get ( i ) ; } | Returns a sig item identified by type and id or null if not found . |
16,050 | public List < ESigItem > findItems ( ESigFilter filter ) { List < ESigItem > list = new ArrayList < ESigItem > ( ) ; if ( filter == null ) { list . addAll ( items ) ; } else { for ( ESigItem item : items ) { if ( filter . matches ( item ) ) { list . add ( item ) ; } } } return list ; } | Returns a list of sig items that match the specified filter . If the filter is null all sig items are returned . |
16,051 | public ESigItem add ( IESigType eSigType , String id , String text , String subGroupName , SignState signState , String data , String session ) { ESigItem item = new ESigItem ( eSigType , id ) ; item . setText ( text ) ; item . setSubGroupName ( subGroupName ) ; item . setSignState ( signState ) ; item . setData ( data... | Ads a new sig item to the list given the required elements . |
16,052 | public ESigItem add ( ESigItem item ) { if ( ! items . contains ( item ) ) { items . add ( item ) ; fireEvent ( "ADD" , item ) ; } return item ; } | Adds a sig item to the list . Requests to add items already in the list are ignored . If an item is successfully added an ESIG . ADD event is fired . |
16,053 | public boolean remove ( ESigItem item ) { boolean result = items . remove ( item ) ; if ( result ) { removed ( item ) ; } return result ; } | Removes a sig item from the list . Fires an ESIG . DELETE event if successful . |
16,054 | public static boolean isConcrete ( Type t ) { if ( t instanceof Class ) { final Class < ? > c = ( Class < ? > ) t ; return ! c . isInterface ( ) && ! Modifier . isAbstract ( c . getModifiers ( ) ) ; } if ( t instanceof ParameterizedType ) { final ParameterizedType p = ( ParameterizedType ) t ; return isConcrete ( p . g... | Test if type is concrete that is is not interface or abstract . If type to test is parameterized uses its raw type . If type to test is null returns false . |
16,055 | public static boolean isNumber ( Type t ) { for ( int i = 0 ; i < NUMERICAL_TYPES . length ; i ++ ) { if ( NUMERICAL_TYPES [ i ] == t ) { return true ; } } return false ; } | Test if type is numeric . A type is considered numeric if is a Java standard class representing a number . |
16,056 | public static boolean isPrimitiveLike ( Type t ) { if ( isNumber ( t ) ) { return true ; } if ( isBoolean ( t ) ) { return true ; } if ( isEnum ( t ) ) { return true ; } if ( isCharacter ( t ) ) { return true ; } if ( isDate ( t ) ) { return true ; } if ( t == String . class ) { return true ; } return false ; } | Test if type is like a primitive? Return true only if given type is a number boolean enumeration character or string . |
16,057 | public static boolean isClass ( String name ) { if ( name == null ) { return false ; } Matcher matcher = CLASS_NAME_PATTERN . matcher ( name ) ; return matcher . find ( ) ; } | Test if given name is a valid Java class name . This predicate returns false if name to test is null . |
16,058 | public static < T > DiGraphIterator < T > getInstance ( T root , Function < ? super T , ? extends Collection < T > > edges ) { return new DiGraphIterator < > ( root , ( y ) -> edges . apply ( y ) . stream ( ) ) ; } | Creates a DiGraphIterator . It will iterate once for every node . |
16,059 | public static < T > Spliterator < T > spliterator ( T root , Function < ? super T , ? extends Stream < T > > edges ) { DiGraphIterator dgi = new DiGraphIterator ( root , edges ) ; return Spliterators . spliteratorUnknownSize ( dgi , 0 ) ; } | Creates a Spliterator |
16,060 | public static void containsAll ( final Path expected , final Path actual ) throws IOException { final Assertion < Path > exists = existsIn ( expected , actual ) ; if ( Files . exists ( expected ) ) { walkFileTree ( expected , new SimpleFileVisitor < Path > ( ) { public FileVisitResult visitFile ( final Path file , fina... | Asserts that every file that exists relative to expected also exists relative to actual . |
16,061 | public static void assertEquals ( final Path expected , final Path actual ) throws IOException { containsAll ( actual , expected ) ; if ( Files . exists ( expected ) ) { containsAll ( expected , actual ) ; walkFileTree ( expected , new SimpleFileVisitor < Path > ( ) { public FileVisitResult visitFile ( final Path file ... | Asserts that two paths are deeply byte - equivalent . |
16,062 | public static void assertByteEquals ( final Path sub , final Path expected , final Path actual ) throws IOException { final int length = 4096 ; final byte [ ] hereBuffer = new byte [ length ] ; final byte [ ] thereBuffer = new byte [ length ] ; long hereLimit = 0 ; long thereLimit = 0 ; try ( InputStream hereStream = n... | Asserts that two paths are byte - equivalent . |
16,063 | public static String getChecksum ( final Algorithm algorithm , final byte [ ] ... byteArrays ) throws NoSuchAlgorithmException { StringBuilder sb = new StringBuilder ( ) ; for ( byte [ ] byteArray : byteArrays ) { sb . append ( getChecksum ( byteArray , algorithm . getAlgorithm ( ) ) ) ; } return sb . toString ( ) ; } | Gets the checksum from the given byte arrays with the given algorithm |
16,064 | public GeoLocation search ( double deltaNM , GeoSearch ... searches ) { List < GeoLocation > list = search ( false , searches ) ; if ( ! list . isEmpty ( ) && GeoDB . isUnique ( list , deltaNM ) ) { return list . get ( 0 ) ; } else { list . removeIf ( ( gl ) -> ! gl . match ( true , searches ) ) ; if ( ! list . isEmpty... | Returns any GeoLocation which matches all tests and is unique in deltaNM range . |
16,065 | public List < GeoLocation > search ( boolean strict , GeoSearch ... searches ) { List < GeoLocation > list = new ArrayList < > ( ) ; for ( GeoFile gf : files ) { gf . search ( strict , list , searches ) ; } return list ; } | Returns a list of GeoLocations which match all the searches |
16,066 | public static boolean isUnique ( List < GeoLocation > list , double delta ) { Location [ ] array = new Location [ list . size ( ) ] ; int index = 0 ; for ( GeoLocation gl : list ) { array [ index ++ ] = gl . getLocation ( ) ; } return ( Location . radius ( array ) <= delta ) ; } | Returns true if greatest distance of any location from their center is less than given delta in nm . |
16,067 | public static Repository load ( Resolver resolver ) throws IOException { Repository repository ; repository = new Repository ( ) ; repository . loadClasspath ( resolver ) ; repository . link ( ) ; return repository ; } | simplified load method for testing |
16,068 | public void loadClasspath ( Resolver resolver ) throws IOException { Enumeration < URL > e ; e = getClass ( ) . getClassLoader ( ) . getResources ( MODULE_DESCRIPTOR ) ; while ( e . hasMoreElements ( ) ) { loadModule ( resolver , e . nextElement ( ) ) ; } } | Loads modules from classpath |
16,069 | public void loadLibrary ( Resolver resolver , Node base , Node descriptor , Node properties ) throws IOException { Source source ; Module module ; Library library ; File file ; addReload ( descriptor ) ; source = Source . load ( properties , base ) ; library = ( Library ) Library . TYPE . loadXml ( descriptor ) . get (... | Core method for loading . A library is a module or an application |
16,070 | public List < Node > link ( ) { List < Module > dependencies ; Module module ; Module resolved ; StringBuilder problems ; List < Node > result ; problems = new StringBuilder ( ) ; for ( Map . Entry < Module , List < String > > entry : notLinked . entrySet ( ) ) { module = entry . getKey ( ) ; dependencies = module . de... | Call this after you ve loaded all libraries |
16,071 | public int doSetData ( Object objData , boolean bDisplayOption , int iMoveMode ) { int iErrorCode = DBConstants . NORMAL_RETURN ; if ( ( m_bFirstTime ) || ( iMoveMode == DBConstants . READ_MOVE ) || ( iMoveMode == DBConstants . SCREEN_MOVE ) ) iErrorCode = super . doSetData ( objData , bDisplayOption , iMoveMode ) ; m_... | Move the physical binary data to this field . If this is an init set only does it until the first change . |
16,072 | public void init ( BaseApplet applet , URL url ) { m_applet = applet ; this . setContentType ( HTML_CONTENT ) ; this . setEditable ( false ) ; this . addHyperlinkListener ( this . createHyperLinkListener ( ) ) ; this . setOpaque ( false ) ; this . setSize ( new Dimension ( 500 , 800 ) ) ; if ( url != null ) this . link... | HTMLView Constructor . |
16,073 | public HyperlinkListener createHyperLinkListener ( ) { return new HyperlinkListener ( ) { public void hyperlinkUpdate ( HyperlinkEvent e ) { if ( e . getEventType ( ) == HyperlinkEvent . EventType . ACTIVATED ) { if ( e instanceof HTMLFrameHyperlinkEvent ) { ( ( HTMLDocument ) getDocument ( ) ) . processHTMLFrameHyperl... | Create the hyperlink listener . |
16,074 | public void setHTMLText ( String strHtmlText ) { if ( m_helpPane != null ) m_helpPane . setVisible ( strHtmlText != null ) ; this . getTaskScheduler ( ) . addTask ( PrivateTaskScheduler . CLEAR_JOBS ) ; Thread thread = new SwingSyncPageWorker ( this , new SyncPageLoader ( null , strHtmlText , this , m_applet , false ) ... | Set this control to this html text . |
16,075 | public TaskScheduler getTaskScheduler ( ) { if ( m_taskScheduler == null ) m_taskScheduler = new PrivateTaskScheduler ( this . getBaseApplet ( ) . getApplication ( ) , 0 , true ) ; return m_taskScheduler ; } | Get my private task scheduler . |
16,076 | public static byte [ ] addressStringToBytes ( String hex ) { final byte [ ] addr ; try { addr = Hex . decode ( hex ) ; } catch ( DecoderException addressIsNotValid ) { return null ; } if ( isValidAddress ( addr ) ) return addr ; return null ; } | Decodes a hex string to address bytes and checks validity |
16,077 | public static < R > Stream < R > of ( R ... elements ) { return new Stream < R > ( new ArrayIterable . ArrayIterator < R > ( elements ) ) ; } | Create a stream of the elements provided . |
16,078 | public static < R > Stream < R > of ( Iterator < R > iterator ) { return new Stream < R > ( iterator ) ; } | Create a stream based on an iterator . |
16,079 | public Optional < T > reduce ( final BiFunction < T , ? super T , T > accumulator ) { boolean found = false ; T result = null ; while ( iterator . hasNext ( ) ) { if ( ! found ) { result = iterator . next ( ) ; found = true ; } else { result = accumulator . apply ( result , iterator . next ( ) ) ; } } return found ? Op... | Performs a reduction on the elements of the stream using an accumulation function and returns an Optional describing the reduced value if any . |
16,080 | public < R > R reduce ( final R initial , final BiFunction < R , ? super T , R > accumulator ) { R returnValue = initial ; while ( iterator . hasNext ( ) ) { returnValue = accumulator . apply ( returnValue , iterator . next ( ) ) ; } return returnValue ; } | Performs a reduction on the elements of this stream using the provided initial value and accumulation functions . |
16,081 | public < R > Stream < R > map ( Function < ? super T , ? extends R > mapper ) { List < R > list = new ArrayList < R > ( ) ; while ( iterator . hasNext ( ) ) { list . add ( mapper . apply ( iterator . next ( ) ) ) ; } return Stream . of ( list ) ; } | Returns a stream consisting of the results of applying the given function to the elements of this stream . |
16,082 | public boolean anyMatch ( Predicate < ? super T > predicate ) { while ( iterator . hasNext ( ) ) { if ( predicate . test ( iterator . next ( ) ) ) { return true ; } } return false ; } | Returns whether any elements of this stream match the provided predicate . If the stream is empty then false is returned and the predicate is not evaluated . |
16,083 | @ SuppressWarnings ( "unchecked" ) public static < T > Stream < T > concat ( Stream < ? extends T > a , Stream < ? extends T > b ) { return new Stream ( Iterators . concat ( a . iterator , b . iterator ) ) ; } | Creates a concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream . |
16,084 | public void init ( ProxyTask proxyTask , RemoteTask remoteTask ) { super . init ( null , remoteTask ) ; m_proxyTask = proxyTask ; } | Creates a new instance of TaskHolder |
16,085 | public String getProperty ( String strKey , Map < String , Object > properties ) { String strProperty = super . getProperty ( strKey , properties ) ; if ( strProperty == null ) if ( ! m_proxyTask . isShared ( ) ) strProperty = m_proxyTask . getProperty ( strKey ) ; return strProperty ; } | Get the servlet s property . For Ajax proxies the top level proxy is shared among sessions . since it is not unique don t return property . |
16,086 | @ SuppressWarnings ( "unchecked" ) public static < E > Page < E > cast ( final Page < ? > page ) { return ( Page < E > ) page ; } | Casts a page . |
16,087 | @ SuppressWarnings ( "unchecked" ) public static < E , T > PageResult < T > createPage ( final Iterable < ? extends E > entries , final PageRequest pageRequest , final long totalSize , final PageEntryTransformer < T , E > transformer ) { final PageResult < T > page = new PageResult < > ( ) ; page . setPageRequest ( pag... | Creates a page . |
16,088 | public static < E , T > Page < T > createPage ( final Page < ? extends E > sourcePage , final PageEntryTransformer < T , E > transformer ) { if ( sourcePage == null ) { return null ; } if ( transformer == null ) { return cast ( sourcePage ) ; } return createPage ( sourcePage . getEntries ( ) , sourcePage . getPageReque... | Transforms a page into another page . |
16,089 | public static < E , T > PageDto createPageDto ( final Page < ? extends E > page , final PageEntryTransformer < T , E > transformer ) { if ( page == null ) { return null ; } if ( page instanceof PageDto && transformer == null ) { return ( PageDto ) page ; } final PageRequestDto pageRequestDto = createPageRequestDto ( pa... | Transforms a page into a page DTO . |
16,090 | public static PageRequestDto createPageRequestDto ( final PageRequest pageRequest ) { final PageRequestDto pageRequestDto ; if ( pageRequest == null ) { pageRequestDto = null ; } else if ( pageRequest instanceof PageRequestDto ) { pageRequestDto = ( PageRequestDto ) pageRequest ; } else { pageRequestDto = new PageReque... | Transforms a page request into a page request DTO . |
16,091 | @ SuppressWarnings ( "unchecked" ) public static < T , S extends T > T transform ( final Object xmlNodeOrJsonMap , final Class < T > valueType , final S defaultObject , final JAXBContext jaxbContext , final ObjectMapper objectMapper ) throws Exception { if ( xmlNodeOrJsonMap == null ) { return defaultObject ; } Validat... | Transforms a XML node or a JSON map into an object . |
16,092 | public BaseField getLeftField ( int iFieldSeq ) { if ( m_rgiFldLeft . length <= iFieldSeq ) return null ; if ( ( m_rgiFldLeft [ iFieldSeq ] instanceof String ) ) if ( ! Utility . isNumeric ( ( String ) m_rgiFldLeft [ iFieldSeq ] ) ) return this . getLeftRecord ( ) . getTable ( ) . getCurrentTable ( ) . getRecord ( ) . ... | Get the equal field from the left table for this link . |
16,093 | public BaseField getRightField ( int iFieldSeq ) { if ( m_rgiFldRight . length <= iFieldSeq ) return null ; if ( m_rgiFldRight [ iFieldSeq ] == null ) return null ; return this . getRightRecord ( ) . getField ( m_rgiFldRight [ iFieldSeq ] ) ; } | Get the equal field from the right table for this link . |
16,094 | public String getTableNames ( boolean bAddQuotes , Map < String , Object > properties ) { String strString = "" ; strString += this . getLeftRecord ( ) . getTableNames ( bAddQuotes ) ; String strOn = "ON" ; switch ( m_JoinType ) { case DBConstants . LEFT_INNER : if ( properties . get ( "INNER_JOIN" ) != null ) strStrin... | Get the SQL table names for this link . |
16,095 | public void moveDataRight ( ) { for ( int i = 1 ; i < m_rgiFldLeft . length ; i ++ ) { if ( this . getRightField ( i ) == null ) break ; if ( this . getLeftField ( i ) == null ) this . getRightField ( i ) . setString ( this . getLeftFieldNameOrValue ( i , true , true ) , DBConstants . DONT_DISPLAY , DBConstants . SCREE... | Fill the right fields with the values from the left fields . |
16,096 | public void open ( ) throws DBException { m_objLastModBookmark = null ; try { String strKeyArea = this . getRecord ( ) . getKeyName ( ) ; KeyAreaInfo keyArea = this . getRecord ( ) . getKeyArea ( - 1 ) ; boolean bKeyOrder = Constants . ASCENDING ; if ( keyArea != null ) bKeyOrder = keyArea . getKeyOrder ( ) ; int iOpen... | Reset the current position and open the file . |
16,097 | public boolean hasPrevious ( ) throws DBException { if ( m_iCurrentRecord >= m_iRecordsAccessed ) return true ; Object record = this . previous ( ) ; if ( record == null ) return false ; else { m_iRecordsAccessed -- ; return true ; } } | Does this list have a previous record? |
16,098 | public Object doGet ( int iRowIndex ) throws DBException { try { m_objLastModBookmark = null ; return m_tableRemote . get ( iRowIndex , 1 ) ; } catch ( RemoteException ex ) { ex . printStackTrace ( ) ; throw new DBException ( ex . getMessage ( ) ) ; } } | Returns an attribute value for the cell at columnIndex and rowIndex . |
16,099 | public void setRemoteTable ( RemoteTable tableRemote , Object syncObject ) { if ( syncObject != null ) tableRemote = new SyncRemoteTable ( tableRemote , syncObject ) ; m_tableRemote = tableRemote ; m_syncObject = syncObject ; } | Set the remote table reference . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.