signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class RowDataTransformer { /** * 设置对应的目标库schema . name , 需要考虑mutl配置情况 * < pre > * case : * 1 . 源 : offer , 目 : offer * 2 . 源 : offer [ 1-128 ] , 目 : offer * 3 . 源 : offer [ 1-128 ] , 目 : offer [ 1-128] * 4 . 源 : offer , 目 : offer [ 1-128 ] 不支持 , 会报错 */ private void buildName ( EventData data , EventD...
DataMedia targetDataMedia = pair . getTarget ( ) ; DataMedia sourceDataMedia = pair . getSource ( ) ; String schemaName = buildName ( data . getSchemaName ( ) , sourceDataMedia . getNamespaceMode ( ) , targetDataMedia . getNamespaceMode ( ) ) ; String tableName = buildName ( data . getTableName ( ) , sourceDataMedia . ...
public class CachedResourceBundlesHandler { /** * ( non - Javadoc ) * @ see net . jawr . web . resource . bundle . handler . ResourceBundlesHandler # * rebuildModifiedBundles ( ) */ @ Override public void rebuildModifiedBundles ( ) { } }
List < JoinableResourceBundle > bundlesToRebuild = rsHandler . getBundlesToRebuild ( ) ; for ( JoinableResourceBundle bundle : bundlesToRebuild ) { ResourceBundlePathsIterator bundlePaths = this . getBundlePaths ( bundle . getId ( ) , new NoCommentCallbackHandler ( ) , Collections . EMPTY_MAP ) ; while ( bundlePaths . ...
public class JmsSyncProducer { /** * Create new JMS session . * @ param connection to use for session creation . * @ return session . * @ throws JMSException */ protected void createSession ( Connection connection ) throws JMSException { } }
if ( session == null ) { if ( ! endpointConfiguration . isPubSubDomain ( ) && connection instanceof QueueConnection ) { session = ( ( QueueConnection ) connection ) . createQueueSession ( false , Session . AUTO_ACKNOWLEDGE ) ; } else if ( endpointConfiguration . isPubSubDomain ( ) && endpointConfiguration . getConnecti...
public class DatabaseEventManager { /** * Fires all collected insertion , deletion or update events as one * DataStoreEvent , i . e . notifies all registered DataStoreListener how the * content of the database has been changed since * { @ link # accumulateDataStoreEvents ( ) } was called . * @ see # accumulateD...
DataStoreEvent e ; switch ( currentDataStoreEventType ) { case INSERT : e = DataStoreEvent . insertionEvent ( dataStoreObjects ) ; break ; case REMOVE : e = DataStoreEvent . removalEvent ( dataStoreObjects ) ; break ; case UPDATE : e = DataStoreEvent . updateEvent ( dataStoreObjects ) ; break ; default : return ; } for...
public class CredHubTemplateFactory { /** * Create a { @ link ReactiveCredHubTemplate } for interaction with a CredHub server * using OAuth2 for authentication . * @ param credHubProperties connection properties * @ param clientOptions connection options * @ param clientRegistrationRepository a repository of OA...
return new ReactiveCredHubTemplate ( credHubProperties , clientHttpConnector ( clientOptions ) , clientRegistrationRepository , authorizedClientRepository ) ;
public class FactionWarfareApi { /** * List of the top corporations in faction warfare Top 10 leaderboard of * corporations for kills and victory points separated by total , last week * and yesterday - - - This route expires daily at 11:05 * @ param datasource * The server name you would like data from ( option...
com . squareup . okhttp . Call call = getFwLeaderboardsCorporationsValidateBeforeCall ( datasource , ifNoneMatch , null ) ; Type localVarReturnType = new TypeToken < FactionWarfareLeaderboardCorporationsResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class snmpcommunity { /** * Use this API to add snmpcommunity resources . */ public static base_responses add ( nitro_service client , snmpcommunity resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { snmpcommunity addresources [ ] = new snmpcommunity [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new snmpcommunity ( ) ; addresources [ i ] . communityname = resources [ i ] . communit...
public class AnnotationTargetsImpl_Targets { /** * When reading from serialization , don ' t set the referenced classes . */ protected void i_setSuperclassName ( String i_subclassName , String i_superclassName ) { } }
i_superclassNameMap . put ( i_subclassName , i_superclassName ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Subclass [ {1} ] has superclass [ {2} ]" , new Object [ ] { getHashText ( ) , i_subclassName , i_superclassName } ) ) ; }
public class TracerFactory { /** * Reads the configuration from the given InputStream . * @ param inputStream the input stream providing the configuration . * @ throws TracerFactory . Exception indicates a configuration problem * @ see TracerFactory # readConfiguration ( java . io . File ) */ public void readConf...
if ( this . traceConfigSchema == null ) System . err . println ( "CAUTION: Unable to validate the given configuration against a schema." ) ; DocumentBuilderFactory builderFactory = javax . xml . parsers . DocumentBuilderFactory . newInstance ( ) ; builderFactory . setNamespaceAware ( true ) ; builderFactory . setXInclu...
public class CPDefinitionOptionRelPersistenceImpl { /** * Caches the cp definition option rels in the entity cache if it is enabled . * @ param cpDefinitionOptionRels the cp definition option rels */ @ Override public void cacheResult ( List < CPDefinitionOptionRel > cpDefinitionOptionRels ) { } }
for ( CPDefinitionOptionRel cpDefinitionOptionRel : cpDefinitionOptionRels ) { if ( entityCache . getResult ( CPDefinitionOptionRelModelImpl . ENTITY_CACHE_ENABLED , CPDefinitionOptionRelImpl . class , cpDefinitionOptionRel . getPrimaryKey ( ) ) == null ) { cacheResult ( cpDefinitionOptionRel ) ; } else { cpDefinitionO...
public class ExcludingRuleImpl { /** * { @ inheritDoc } */ public boolean suiteFor ( NodeData state ) { } }
boolean suiteForPath = excludePath == null ? true : validateByPath ( state ) ; boolean suiteForNodeType = excludeNodeType == null ? true : validateByNodeType ( state ) ; return suiteForPath && suiteForNodeType ;
public class SQLiteDelegate { /** * Convenience method for inserting a row into the database . * @ param dto any object * @ return T object with the * @ throws android . database . sqlite . SQLiteException Error inserting */ @ Override public synchronized T create ( T dto ) throws Exception { } }
long rowid = db . insert ( transformer . getTableName ( ) , null , transformer . transform ( dto ) ) ; Log . i ( this . getClass ( ) . getName ( ) , "ROW ID: " + rowid ) ; if ( rowid == - 1 ) throw new SQLiteException ( "Error inserting " + dto . getClass ( ) . toString ( ) ) ; return transformer . setId ( dto , ( int ...
public class CachedDirectoryLookupService { /** * Stop the CachedDirectoryLookupService . * It is thread safe . */ @ Override public void stop ( ) { } }
if ( isStarted . compareAndSet ( true , false ) ) { // if you shutdown it , it can not be use anymore super . stop ( ) ; ScheduledExecutorService service = this . syncService . getAndSet ( newSyncService ( ) ) ; service . shutdown ( ) ; LOGGER . info ( "Cache sync Service is shutdown" ) ; for ( Entry < String , ModelSe...
public class Distill { /** * Split using delimiter and convert to slash notation . */ static String [ ] parsePackages ( String packages ) { } }
if ( packages == null || packages . trim ( ) . length ( ) == 0 ) { return new String [ 0 ] ; } String [ ] commaSplit = packages . split ( "," ) ; String [ ] processPackages = new String [ commaSplit . length ] ; for ( int i = 0 ; i < commaSplit . length ; i ++ ) { processPackages [ i ] = convert ( commaSplit [ i ] ) ; ...
public class TaskState { /** * Convert this { @ link TaskState } to a json document . * @ param jsonWriter a { @ link com . google . gson . stream . JsonWriter } used to write the json document * @ throws IOException */ public void toJson ( JsonWriter jsonWriter , boolean keepConfig ) throws IOException { } }
jsonWriter . beginObject ( ) ; jsonWriter . name ( "task id" ) . value ( this . getTaskId ( ) ) . name ( "task state" ) . value ( this . getWorkingState ( ) . name ( ) ) . name ( "start time" ) . value ( this . getStartTime ( ) ) . name ( "end time" ) . value ( this . getEndTime ( ) ) . name ( "duration" ) . value ( th...
public class MtasSolrCollectionResult { /** * Merge . * @ param newItem the new item * @ throws IOException Signals that an I / O exception has occurred . */ public void merge ( MtasSolrCollectionResult newItem ) throws IOException { } }
if ( action != null && newItem . action != null ) { if ( action . equals ( ComponentCollection . ACTION_CREATE ) && newItem . action . equals ( ComponentCollection . ACTION_CREATE ) ) { values . addAll ( newItem . values ) ; if ( id != null && ( newItem . id == null || ! newItem . id . equals ( id ) ) ) { id = null ; }...
public class SecurityInitializer { /** * Called during ORB initialization . If a service must resolve initial * references as part of its initialization , it can assume that all * initial references will be available at this point . * Calling the < code > post _ init < / code > operations is not the final * tas...
try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . debug ( tc , "Registering interceptors and policy factories" ) ; TSSConfig config = Util . getRegisteredTSSConfig ( info . orb_id ( ) ) ; try { Codec codec ; try { codec = info . codec_factory ( ) . create_codec ( CDR_1_2_ENCODING ) ;...
public class UintMap { /** * Set int value of the key . * If key does not exist , also set its object value to null . */ public void put ( int key , int value ) { } }
if ( key < 0 ) Kit . codeBug ( ) ; int index = ensureIndex ( key , true ) ; if ( ivaluesShift == 0 ) { int N = 1 << power ; // keys . length can be N * 2 after clear which set ivaluesShift to 0 if ( keys . length != N * 2 ) { int [ ] tmp = new int [ N * 2 ] ; System . arraycopy ( keys , 0 , tmp , 0 , N ) ; keys = tmp ;...
public class PagerRenderer { /** * Build the anchor * @ param appender * @ param queryParams * @ param labelKey */ protected final void buildAnchor ( AbstractRenderAppender appender , Map queryParams , String labelKey ) { } }
assert appender != null ; assert queryParams != null ; assert labelKey != null && labelKey . length ( ) > 0 ; _anchorState . href = buildPageUri ( queryParams ) ; _anchorTag . doStartTag ( appender , _anchorState ) ; appender . append ( _gridModel . getMessage ( labelKey ) ) ; _anchorTag . doEndTag ( appender ) ; _anch...
public class SequenceNumberAuditor { /** * Check the public and the private sequence * @ param jsonArray */ private void checkPublicAndPrivateSequence ( final JSONArray jsonArray ) { } }
final long nextPublicSequnceNumber = jsonArray . getLong ( jsonArray . length ( ) - 2 ) ; final long nextPrivateSequnceNumber = jsonArray . getLong ( jsonArray . length ( ) - 1 ) ; auditPublicSequence ( nextPublicSequnceNumber ) ; auditPrivateSequence ( nextPrivateSequnceNumber ) ;
public class PaigeTarjan { /** * Creates a new block . The { @ link Block # low } and { @ link Block # high } fields will be initialized to { @ code - 1 } . * @ return a newly created block . */ public Block createBlock ( ) { } }
Block b = new Block ( - 1 , - 1 , numBlocks ++ , blocklistHead ) ; blocklistHead = b ; return b ;
public class AWSBackupClient { /** * Returns two sets of metadata key - value pairs . The first set lists the metadata that the recovery point was * created with . The second set lists the metadata key - value pairs that are required to restore the recovery point . * These sets can be the same , or the restore meta...
request = beforeClientExecution ( request ) ; return executeGetRecoveryPointRestoreMetadata ( request ) ;
public class AmazonDirectConnectClient { /** * Deprecated . Use < a > DescribeLoa < / a > instead . * Gets the LOA - CFA for the specified interconnect . * The Letter of Authorization - Connecting Facility Assignment ( LOA - CFA ) is a document that is used when * establishing your cross connect to AWS at the col...
request = beforeClientExecution ( request ) ; return executeDescribeInterconnectLoa ( request ) ;
public class SarlFieldBuilderImpl { /** * Initialize the Ecore element . * @ param container the container of the SarlField . * @ param name the name of the SarlField . */ public void eInit ( XtendTypeDeclaration container , String name , String modifier , IJvmTypeProvider context ) { } }
setTypeResolutionContext ( context ) ; if ( this . sarlField == null ) { this . container = container ; this . sarlField = SarlFactory . eINSTANCE . createSarlField ( ) ; this . sarlField . setAnnotationInfo ( XtendFactory . eINSTANCE . createXtendMember ( ) ) ; this . sarlField . setName ( name ) ; if ( Strings . equa...
public class MessageBuilder { /** * Creates a ACK message . * @ param zxid the zxid of the transaction ACK . * @ return a protobuf message . */ public static Message buildAck ( Zxid zxid ) { } }
ZabMessage . Zxid zzxid = toProtoZxid ( zxid ) ; Ack ack = Ack . newBuilder ( ) . setZxid ( zzxid ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . ACK ) . setAck ( ack ) . build ( ) ;
public class Menu { /** * { @ inheritDoc } */ @ Override protected void add ( final long _sortId , final long _id ) throws CacheReloadException { } }
final Command command = Command . get ( _id ) ; if ( command == null ) { final Menu subMenu = Menu . get ( _id ) ; add ( _sortId , subMenu ) ; } else { add ( _sortId , command ) ; }
public class JMElasticsearchClient { /** * Gets filtered index list . * @ param containedString the contained string * @ return the filtered index list */ public List < String > getFilteredIndexList ( String containedString ) { } }
return getAllIndices ( ) . stream ( ) . filter ( index -> index . contains ( containedString ) ) . collect ( toList ( ) ) ;
public class D6Crud { /** * Execute select statement for the joined multiple table . < br > * < br > * < br > * - About SQL < br > * You can use prepared SQL . < br > * < br > * In addition , you can also use non - wildcard ( ' ? ' ) SQL ( = raw SQL ) . In this * case searchKeys must be null or empty arra...
"rawtypes" , "unchecked" } ) public Map < Class < ? > , List < Object > > execSelectTableWithJoin ( String preparedSql , Object [ ] searchKeys , Class < ? extends D6Model > ... modelClazz ) { log ( "#execSelectTableWithJoin preparedSql=" + preparedSql + " searchKeys=" + searchKeys + " modelClazz=" + modelClazz ) ; fina...
public class WebhooksInner { /** * Retrieve a list of webhooks . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; WebhookInner & gt ; object */ pu...
return listByAutomationAccountNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < WebhookInner > > , Page < WebhookInner > > ( ) { @ Override public Page < WebhookInner > call ( ServiceResponse < Page < WebhookInner > > response ) { return response . body ( ) ; } } ) ;
public class CommercePriceListAccountRelServiceBaseImpl { /** * Sets the commerce tier price entry local service . * @ param commerceTierPriceEntryLocalService the commerce tier price entry local service */ public void setCommerceTierPriceEntryLocalService ( com . liferay . commerce . price . list . service . Commerc...
this . commerceTierPriceEntryLocalService = commerceTierPriceEntryLocalService ;
public class Normalizer2Impl { /** * at the cost of building the FCD trie for a decomposition normalizer . */ public boolean hasDecompBoundary ( int c , boolean before ) { } }
for ( ; ; ) { if ( c < minDecompNoCP ) { return true ; } int norm16 = getNorm16 ( c ) ; if ( isHangul ( norm16 ) || isDecompYesAndZeroCC ( norm16 ) ) { return true ; } else if ( norm16 > MIN_NORMAL_MAYBE_YES ) { return false ; // ccc ! = 0 } else if ( isDecompNoAlgorithmic ( norm16 ) ) { c = mapAlgorithmic ( c , norm16...
public class ClassInfo { /** * Filter classes according to scan spec and class type . * @ param classes * the classes * @ param scanSpec * the scan spec * @ param strictWhitelist * If true , exclude class if it is is external , blacklisted , or a system class . * @ param classTypes * the class types *...
if ( classes == null ) { return Collections . < ClassInfo > emptySet ( ) ; } boolean includeAllTypes = classTypes . length == 0 ; boolean includeStandardClasses = false ; boolean includeImplementedInterfaces = false ; boolean includeAnnotations = false ; for ( final ClassType classType : classTypes ) { switch ( classTy...
public class SyntheticStorableBuilder { /** * ( non - Javadoc ) * @ see com . amazon . carbonado . synthetic . SyntheticBuilder # prepare ( ) */ public ClassFileBuilder prepare ( ) throws SupportException { } }
if ( mPrimaryKey == null ) { throw new IllegalStateException ( "Primary key not defined" ) ; } // Clear the cached result , if any mStorableClass = null ; mClassFileGenerator = new StorableClassFileBuilder ( mClassNameProvider , mLoader , SyntheticStorableBuilder . class , mEvolvable ) ; ClassFile cf = mClassFileGenera...
public class BaseBuffer { /** * Compare this fields with the next data in the buffer . * This is a utility method that compares the record . * @ param field The target field . * @ return True if they are equal . */ public boolean compareNextToField ( FieldInfo field ) // Must be to call right Get calls { } }
Object objNext = this . getNextData ( ) ; if ( objNext == DATA_ERROR ) return false ; // EOF if ( objNext == DATA_EOF ) return false ; // EOF if ( objNext == DATA_SKIP ) return true ; // Don ' t set this field Object objField = field . getData ( ) ; if ( ( objNext == null ) || ( objField == null ) ) { if ( ( objNext ==...
public class VirtualGrid { /** * Adjusts the given time either rounding it up or down . * @ param time * the time to adjust * @ param roundUp * the rounding direction * @ param firstDayOfWeek * the first day of the week ( needed for rounding weeks ) * @ return the adjusted time */ public ZonedDateTime adj...
Instant instant = time . toInstant ( ) ; ZoneId zoneId = time . getZone ( ) ; instant = adjustTime ( instant , zoneId , roundUp , firstDayOfWeek ) ; return ZonedDateTime . ofInstant ( instant , zoneId ) ;
public class DSClientFactory { /** * Gets the pooling options . * @ param connectionProperties * the connection properties * @ return the pooling options */ private PoolingOptions getPoolingOptions ( Properties connectionProperties ) { } }
// minSimultaneousRequests , maxSimultaneousRequests , coreConnections , // maxConnections PoolingOptions options = new PoolingOptions ( ) ; String hostDistance = connectionProperties . getProperty ( "hostDistance" ) ; String maxConnectionsPerHost = connectionProperties . getProperty ( "maxConnectionsPerHost" ) ; Strin...
public class DatagramSocketSettings { /** * endregion */ public void applySettings ( @ NotNull DatagramChannel channel ) throws IOException { } }
if ( receiveBufferSize != 0 ) { channel . setOption ( SO_RCVBUF , receiveBufferSize ) ; } if ( sendBufferSize != 0 ) { channel . setOption ( SO_SNDBUF , sendBufferSize ) ; } if ( reuseAddress != DEF_BOOL ) { channel . setOption ( SO_REUSEADDR , reuseAddress != FALSE ) ; } if ( broadcast != DEF_BOOL ) { channel . setOpt...
public class CmsJlanRepository { /** * Checks if a user may access this repository . < p > * @ param user the name of the user * @ return true if the user may access the repository */ public boolean allowAccess ( String user ) { } }
try { return m_cms . getPermissions ( m_root , user ) . requiresViewPermission ( ) ; } catch ( CmsException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; return true ; }
public class CdiSpiHelper { /** * Generates a unique signature for a collection of annotations . */ private static String createAnnotationCollectionId ( Collection < Annotation > annotations ) { } }
if ( annotations . isEmpty ( ) ) return "" ; return annotations . stream ( ) . sorted ( comparing ( a -> a . annotationType ( ) . getName ( ) ) ) . map ( CdiSpiHelper :: createAnnotationId ) . collect ( joining ( "," , "[" , "]" ) ) ;
public class SipSessionsUtilImpl { /** * { @ inheritDoc } */ public SipSession getCorrespondingSipSession ( SipSession sipSession , String headerName ) { } }
MobicentsSipSession correspondingSipSession = null ; if ( headerName . equalsIgnoreCase ( JoinHeader . NAME ) ) { correspondingSipSession = joinSession . get ( ( ( MobicentsSipSession ) sipSession ) . getKey ( ) ) ; } else if ( headerName . equalsIgnoreCase ( ReplacesHeader . NAME ) ) { correspondingSipSession = replac...
public class Ftp { /** * copy a local file to server * @ return FTPClient * @ throws IOException * @ throws PageException */ private AFTPClient actionPutFile ( ) throws IOException , PageException { } }
required ( "remotefile" , remotefile ) ; required ( "localfile" , localfile ) ; AFTPClient client = getClient ( ) ; Resource local = ResourceUtil . toResourceExisting ( pageContext , localfile ) ; // new File ( localfile ) ; // if ( failifexists & & local . exists ( ) ) throw new ApplicationException ( " File [ " + loc...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcDraughtingPreDefinedCurveFont ( ) { } }
if ( ifcDraughtingPreDefinedCurveFontEClass == null ) { ifcDraughtingPreDefinedCurveFontEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 177 ) ; } return ifcDraughtingPreDefinedCurveFontEClass ;
public class Record { /** * Get the record type from the field that specifies the record type . * ( Override this ) . * @ return The record type ( as an object ) . */ public BaseField getSharedRecordTypeKey ( ) { } }
if ( this . getFieldCount ( ) >= 2 ) // Wild guess ( typically the second field ) if ( this . getField ( DBConstants . MAIN_FIELD + 1 ) instanceof IntegerField ) return this . getField ( DBConstants . MAIN_FIELD + 1 ) ; return null ;
public class WorkbinsApi { /** * Get the content of multiple Workbins . * @ param getWorkbinsContentData ( required ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < ApiSu...
com . squareup . okhttp . Call call = getWorkbinsContentValidateBeforeCall ( getWorkbinsContentData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class ShowImages { /** * Creates a window showing the specified image . */ public static ImagePanel showWindow ( BufferedImage img , String title , boolean closeOnExit ) { } }
JFrame frame = new JFrame ( title ) ; ImagePanel panel = new ImagePanel ( img ) ; panel . setScaling ( ScaleOptions . DOWN ) ; // If the window will be too large to be displayed on the monitor set the bounds to something that can be // shown . The default behavior will just change one axis leaving it to have an awkward...
public class FaunusPipeline { /** * Apply the provided closure to the current element and emit the result . * @ param closure the closure to apply to the element * @ return the extended FaunusPipeline */ public FaunusPipeline transform ( final String closure ) { } }
this . state . assertNotLocked ( ) ; this . state . assertNoProperty ( ) ; this . compiler . addMap ( TransformMap . Map . class , NullWritable . class , FaunusVertex . class , TransformMap . createConfiguration ( this . state . getElementType ( ) , this . validateClosure ( closure ) ) ) ; this . state . lock ( ) ; mak...
public class MapsforgeTilesGenerator { /** * Get tile data for a given lat / lon / zoomlevel . * @ param lon the WGS84 longitude . * @ param lat the WGS84 latitude . * @ param zoom the zoomlevel * @ param adaptee the class to adapt to . * @ return the generated data . * @ throws IOException */ public < T > ...
final int ty = MercatorProjection . latitudeToTileY ( lat , ( byte ) zoom ) ; final int tx = MercatorProjection . longitudeToTileX ( lon , ( byte ) zoom ) ; return getTile4TileCoordinate ( ty , tx , zoom , adaptee ) ;
public class DefaultGroovyMethods { /** * Iterates over the elements of an iterable collection of items , starting * from a specified startIndex , and returns the index of the last item that * matches the condition specified in the closure . * @ param self the iteration object over which to iterate * @ param st...
int result = - 1 ; int i = 0 ; BooleanClosureWrapper bcw = new BooleanClosureWrapper ( closure ) ; for ( Iterator iter = InvokerHelper . asIterator ( self ) ; iter . hasNext ( ) ; i ++ ) { Object value = iter . next ( ) ; if ( i < startIndex ) { continue ; } if ( bcw . call ( value ) ) { result = i ; } } return result ...
public class GenericEncodingStrategy { /** * Push decoding instanceVar to stack in preparation to calling * storePropertyValue . * @ param ordinal zero - based property ordinal , used only if instanceVar * refers to an object array . * @ param instanceVar local variable referencing Storable instance , * defau...
if ( instanceVar == null ) { // Push this to stack in preparation for storing a property . a . loadThis ( ) ; } else if ( instanceVar . getType ( ) != TypeDesc . forClass ( Object [ ] . class ) ) { // Push reference to stack in preparation for storing a property . a . loadLocal ( instanceVar ) ; } else { // Push array ...
public class MediaWikiApiImpl { /** * handle the given error Message according to the exception setting * @ param errMsg * @ throws Exception */ protected void handleError ( String errMsg ) throws Exception { } }
// log it LOGGER . log ( Level . SEVERE , errMsg ) ; // and throw an error if this is configured if ( this . isThrowExceptionOnError ( ) ) { throw new Exception ( errMsg ) ; }
public class IOUtil { /** * copy a inputstream to a outputstream * @ param in * @ param out * @ param closeIS * @ param closeOS * @ throws IOException */ public static final void merge ( InputStream in1 , InputStream in2 , OutputStream out , boolean closeIS1 , boolean closeIS2 , boolean closeOS ) throws IOExc...
try { merge ( in1 , in2 , out , 0xffff ) ; } finally { if ( closeIS1 ) closeEL ( in1 ) ; if ( closeIS2 ) closeEL ( in2 ) ; if ( closeOS ) closeEL ( out ) ; }
public class Database { /** * Retrieve the document with the specified ID from the database and deserialize to an * instance of the POJO of type T . Uses the additional parameters specified when making the * { @ code GET } request . * < P > Example usage to get inline attachments : < / P > * < pre > * { @ cod...
assertNotEmpty ( params , "params" ) ; return db . find ( classType , id , params . getInternalParams ( ) ) ;
public class StaticFileWeb { /** * Service a request . * @ param request the http request facade * @ param response the http response facade */ @ Override public void service ( RequestWeb req ) { } }
init ( ) ; String pathInfo = req . pathInfo ( ) ; if ( pathInfo . isEmpty ( ) || pathInfo . equals ( "/" ) ) { pathInfo = _config . get ( "server.index" , "index.html" ) ; } else { pathInfo = pathInfo . substring ( 1 ) ; } Path path = _root . resolve ( pathInfo ) ; // PathImpl path = Vfs . lookup ( root ) . lookup ( " ...
public class BlogEventProcessor { /** * # build - handler */ @ Override public ReadSideHandler < BlogEvent > buildHandler ( ) { } }
return new ReadSideHandler < BlogEvent > ( ) { @ Override public CompletionStage < Done > globalPrepare ( ) { return myDatabase . createTables ( ) ; } @ Override public CompletionStage < Offset > prepare ( AggregateEventTag < BlogEvent > tag ) { return myDatabase . loadOffset ( tag ) ; } @ Override public Flow < Pair <...
public class ValueInterpreter { /** * Convert signed bytes to a 32 - bit short float value . */ private static float bytesToFloat ( byte b0 , byte b1 , byte b2 , byte b3 ) { } }
int mantissa = unsignedToSigned ( unsignedByteToInt ( b0 ) + ( unsignedByteToInt ( b1 ) << 8 ) + ( unsignedByteToInt ( b2 ) << 16 ) , 24 ) ; return ( float ) ( mantissa * Math . pow ( 10 , b3 ) ) ;
public class CreateFunctionRequest { /** * A list of < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / configuration - layers . html " > function layers < / a > to * add to the function ' s execution environment . Specify each layer by its ARN , including the version . * < b > NOTE : < / b...
if ( this . layers == null ) { setLayers ( new com . amazonaws . internal . SdkInternalList < String > ( layers . length ) ) ; } for ( String ele : layers ) { this . layers . add ( ele ) ; } return this ;
public class Assembly { /** * Prepares all files added for tus uploads . * @ param assemblyUrl the assembly url affiliated with the tus upload . * @ throws IOException when there ' s a failure with file retrieval . * @ throws ProtocolException when there ' s a failure with tus upload . */ protected void processTu...
tusClient . setUploadCreationURL ( new URL ( getClient ( ) . getHostUrl ( ) + "/resumable/files/" ) ) ; tusClient . enableResuming ( tusURLStore ) ; for ( Map . Entry < String , File > entry : files . entrySet ( ) ) { processTusFile ( entry . getValue ( ) , entry . getKey ( ) , assemblyUrl ) ; } for ( Map . Entry < Str...
public class ClientSocketFactory { /** * Called when the socket read / write fails . */ @ Override public void failSocket ( long time ) { } }
getRequestFailProbe ( ) . start ( ) ; _failCountTotal . incrementAndGet ( ) ; logFinest ( L . l ( "failSocket: time={0}, _failTime={1}" , time , _failTime ) ) ; synchronized ( this ) { if ( _failTime < time ) { degrade ( time ) ; _firstSuccessTime = 0 ; _failTime = time ; _lastFailTime = _failTime ; _dynamicFailRecover...
public class GenericUtils { /** * Utility method to count the total number of " used " bytes in the list of * buffers . This would represent the size of the data if it was printed * out . * @ param list * @ return int */ static public int sizeOf ( WsByteBuffer [ ] list ) { } }
if ( null == list ) { return 0 ; } int size = 0 ; for ( int i = 0 ; i < list . length ; i ++ ) { if ( null != list [ i ] ) { size += list [ i ] . remaining ( ) ; } } return size ;
public class CmsMappingResolutionContext { /** * Writes all the stored URL name mappings to the database . < p > * @ throws CmsException if something goes wrong */ public void commitUrlNameMappings ( ) throws CmsException { } }
Set < CmsUUID > structureIds = Sets . newHashSet ( ) ; for ( InternalUrlNameMappingEntry entry : m_urlNameMappingEntries ) { structureIds . add ( entry . getStructureId ( ) ) ; } boolean urlnameReplace = false ; for ( CmsUUID structureId : structureIds ) { try { CmsResource resource = m_cms . readResource ( structureId...
public class FunctionExtensions { /** * Curries a function that takes one argument . * @ param function * the original function . May not be < code > null < / code > . * @ param argument * the fixed argument . * @ return a function that takes no arguments . Never < code > null < / code > . */ @ Pure public st...
if ( function == null ) throw new NullPointerException ( "function" ) ; return new Function0 < RESULT > ( ) { @ Override public RESULT apply ( ) { return function . apply ( argument ) ; } } ;
public class StackErrorMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StackError stackError , ProtocolMarshaller protocolMarshaller ) { } }
if ( stackError == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stackError . getErrorCode ( ) , ERRORCODE_BINDING ) ; protocolMarshaller . marshall ( stackError . getErrorMessage ( ) , ERRORMESSAGE_BINDING ) ; } catch ( Exception e ) { th...
public class SystemViewImporter { /** * endPrimaryType . * @ return * @ throws PathNotFoundException * @ throws RepositoryException * @ throws NoSuchNodeTypeException */ private ImportPropertyData endPrimaryType ( ) throws PathNotFoundException , RepositoryException , NoSuchNodeTypeException { } }
ImportPropertyData propertyData ; String sName = propertyInfo . getValues ( ) . get ( 0 ) . toString ( ) ; InternalQName primaryTypeName = locationFactory . parseJCRName ( sName ) . getInternalName ( ) ; ImportNodeData nodeData = ( ImportNodeData ) tree . pop ( ) ; if ( ! Constants . ROOT_UUID . equals ( nodeData . get...
public class ImageLoader { /** * Returns an ImageContainer for the requested URL . * The ImageContainer will contain either the specified default bitmap or the loaded bitmap . * If the default was returned , the { @ link ImageLoader } will be invoked when the * request is fulfilled . * @ param requestUrl The UR...
return get ( requestUrl , listener , 0 , 0 , tag ) ;
public class TCPWriteRequestContextImpl { /** * internal async write */ protected VirtualConnection writeInternal ( long numBytes , TCPWriteCompletedCallback writeCallback , boolean forceQueue , int time ) { } }
int timeout = time ; if ( timeout == IMMED_TIMEOUT ) { immediateTimeout ( ) ; return null ; } else if ( timeout == ABORT_TIMEOUT ) { abort ( ) ; immediateTimeout ( ) ; return null ; } // if using channel timeout , reset to that value if ( timeout == TCPRequestContext . USE_CHANNEL_TIMEOUT ) { timeout = getConfig ( ) . ...
public class Introspector { /** * = = = = = helper mthod = = = = = */ private void initJavaClassCache ( Class clazz ) { } }
String clazzName = clazz . getName ( ) ; Class cl = classCache . get ( clazzName ) ; if ( null == cl ) { synchronized ( clazz ) { // 进行锁控制 cl = classCache . get ( clazzName ) ; // double check if ( cl != null ) { return ; } Method [ ] methods = clazz . getMethods ( ) ; for ( Method m : methods ) { String key = buildMet...
public class MultiLayerNetwork { /** * Returns the number of parameters in the network * @ param backwards If true : exclude any parameters uned only in unsupervised layerwise training ( such as the decoder * parameters in an autoencoder ) * @ return The number of parameters */ @ Override public long numParams ( ...
int length = 0 ; for ( int i = 0 ; i < layers . length ; i ++ ) length += layers [ i ] . numParams ( backwards ) ; return length ;
public class SDMath { /** * Cosine similarity pairwise reduction operation . The output contains the cosine similarity for each tensor / subset * along the specified dimensions : < br > * out = ( sum _ i x [ i ] * y [ i ] ) / ( sqrt ( sum _ i x [ i ] ^ 2 ) * sqrt ( sum _ i y [ i ] ^ 2) * @ param x Input variable ...
validateNumerical ( "cosine similarity" , x , y ) ; SDVariable cosim = f ( ) . cosineSimilarity ( x , y , dimensions ) ; return updateVariableNameAndReference ( cosim , name ) ;
public class CmsModuleUpdater { /** * Compares the relation ( not defined in content ) for a resource with those to be imported , and makes * the necessary modifications . * @ param cms the CMS context * @ param importResource the resource * @ param relations the relations to be imported * @ throws CmsExcepti...
Map < String , CmsRelationType > relTypes = new HashMap < > ( ) ; for ( CmsRelationType relType : OpenCms . getResourceManager ( ) . getRelationTypes ( ) ) { relTypes . put ( relType . getName ( ) , relType ) ; } Set < CmsRelation > existingRelations = Sets . newHashSet ( cms . readRelations ( CmsRelationFilter . relat...
public class DefaultExceptionMapper { /** * { @ inheritDoc } */ @ Override public Response toResponse ( Throwable exception ) { } }
int status = parseHttpStatus ( exception ) ; ErrorMessage message = new ErrorMessage ( ) ; if ( exception instanceof MappableException && exception . getCause ( ) != null ) { exception = exception . getCause ( ) ; } message . setCode ( Hashing . murmur3_32 ( ) . hashUnencodedChars ( exception . getClass ( ) . getName (...
public class AbstractStreamOperator { @ Override public void setup ( StreamTask < ? , ? > containingTask , StreamConfig config , Output < StreamRecord < OUT > > output ) { } }
final Environment environment = containingTask . getEnvironment ( ) ; this . container = containingTask ; this . config = config ; try { OperatorMetricGroup operatorMetricGroup = environment . getMetricGroup ( ) . getOrAddOperator ( config . getOperatorID ( ) , config . getOperatorName ( ) ) ; this . output = new Count...
public class TreeCrossover { /** * the abstract " crossover " method usually don ' t have to do additional casts . */ private < A > void crossover ( final MSeq < Chromosome < G > > c1 , final MSeq < Chromosome < G > > c2 , final int index ) { } }
@ SuppressWarnings ( "unchecked" ) final TreeNode < A > tree1 = ( TreeNode < A > ) TreeNode . ofTree ( c1 . get ( index ) . getGene ( ) ) ; @ SuppressWarnings ( "unchecked" ) final TreeNode < A > tree2 = ( TreeNode < A > ) TreeNode . ofTree ( c2 . get ( index ) . getGene ( ) ) ; crossover ( tree1 , tree2 ) ; final Flat...
public class CmsSetupBean { /** * Reads all properties from the components . properties file at the given location , a folder or a zip file . < p > * @ param location the location to read the properties from * @ return the read properties * @ throws FileNotFoundException if the properties file could not be found ...
InputStream stream = null ; ZipFile zipFile = null ; try { // try to interpret the fileName as a folder File folder = new File ( location ) ; // if it is a file it must be a zip - file if ( folder . isFile ( ) ) { zipFile = new ZipFile ( location ) ; ZipEntry entry = zipFile . getEntry ( COMPONENTS_PROPERTIES ) ; // pa...
public class EUI48XmlAdapter { /** * Converts the given { @ link EUI48 } value to its string representation . Returns { @ code null } if * { @ code val } is { @ code null } . * @ param val The EUI - 48 value . * @ return The string representation of { @ code val } . * @ see EUI48 # toString ( ) */ @ Override pu...
return val == null ? null : val . toString ( ) ;
public class ServerService { /** * Get list public IPs for provided server reference { @ code server } * @ param server server reference * @ return list public IPs */ public List < PublicIpMetadata > findPublicIp ( Server server ) { } }
ServerMetadata metadata = findByRef ( server ) ; return findPublicIp ( metadata ) ;
public class DialogPlusBuilder { /** * Sets the given view as footer . * @ param fixed is used to determine whether footer should be fixed or not . Fixed if true , scrollable otherwise */ public DialogPlusBuilder setFooter ( @ NonNull View view , boolean fixed ) { } }
this . footerView = view ; this . fixedFooter = fixed ; return this ;
public class VFSStoreResource { /** * Obtains a list of prepared transaction branches from a resource manager . * @ param _ flag flag * @ return always < code > null < / code > */ @ Override public Xid [ ] recover ( final int _flag ) { } }
if ( VFSStoreResource . LOG . isDebugEnabled ( ) ) { VFSStoreResource . LOG . debug ( "recover (flag = " + _flag + ")" ) ; } return null ;
public class InternalSARLLexer { /** * $ ANTLR start " RULE _ COMMENT _ RICH _ TEXT _ INBETWEEN " */ public final void mRULE_COMMENT_RICH_TEXT_INBETWEEN ( ) throws RecognitionException { } }
try { int _type = RULE_COMMENT_RICH_TEXT_INBETWEEN ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalSARL . g : 48777:34 : ( ' \ \ uFFFD \ \ uFFFD ' ( ~ ( ( ' \ \ n ' | ' \ \ r ' ) ) ) * ( ( ' \ \ r ' ) ? ' \ \ n ' ( RULE _ IN _ RICH _ STRING ) * ( ' \ \ ' ' ( ' \ \ ' ' ) ? ) ? ' \ \ uFFFD ' ) ? ) // InternalSARL . g...
public class SystemUtil { /** * Determines the Java version of the executing JVM . * @ return Java version */ public static String getJavaVersion ( ) { } }
String [ ] sysPropParms = new String [ ] { "java.runtime.version" , "java.version" } ; for ( int i = 0 ; i < sysPropParms . length ; i ++ ) { String val = System . getProperty ( sysPropParms [ i ] ) ; if ( ! StringUtil . isEmpty ( val ) ) { return val ; } } return null ;
public class WeakFastHashMap { /** * Remove any mapping for this key , and return any previously * mapped value . * @ param key the key whose mapping is to be removed * @ return the value removed , or null */ @ Override public V remove ( Object key ) { } }
if ( fast ) { synchronized ( this ) { Map < K , V > temp = cloneMap ( map ) ; V result = temp . remove ( key ) ; map = temp ; return ( result ) ; } } else { synchronized ( map ) { return ( map . remove ( key ) ) ; } }
public class MetaClassImpl { /** * Constructor selection algorithm for Groovy 2.1.9 + . * This selection algorithm was introduced as a workaround for GROOVY - 6080 . Instead of generating an index between * 0 and N where N is the number of super constructors at the time the class is compiled , this algorithm uses ...
if ( arguments == null ) arguments = EMPTY_ARGUMENTS ; Class [ ] argClasses = MetaClassHelper . convertToTypeArray ( arguments ) ; MetaClassHelper . unwrap ( arguments ) ; CachedConstructor constructor = ( CachedConstructor ) chooseMethod ( "<init>" , constructors , argClasses ) ; if ( constructor == null ) { construct...
public class XPathBuilder { /** * this method is meant to be overridden by each component * @ param disabled disabled * @ return String */ protected String getItemPath ( boolean disabled ) { } }
String selector = getBaseItemPath ( ) ; String subPath = applyTemplateValue ( disabled ? "disabled" : "enabled" ) ; if ( subPath != null ) { selector += ! Strings . isNullOrEmpty ( selector ) ? " and " + subPath : subPath ; } Map < String , String [ ] > templatesValues = getTemplatesValues ( ) ; String [ ] tagAndPositi...
public class X509CertInfo { /** * Marshal the contents of a " raw " certificate into a DER sequence . */ private void emit ( DerOutputStream out ) throws CertificateException , IOException { } }
DerOutputStream tmp = new DerOutputStream ( ) ; // version number , iff not V1 version . encode ( tmp ) ; // Encode serial number , issuer signing algorithm , issuer name // and validity serialNum . encode ( tmp ) ; algId . encode ( tmp ) ; if ( ( version . compare ( CertificateVersion . V1 ) == 0 ) && ( issuer . toStr...
public class CoronaJobHistory { /** * Log start time of task ( TIP ) . * @ param taskId task id * @ param taskType MAP or REDUCE * @ param startTime startTime of tip . */ public void logTaskStarted ( TaskID taskId , String taskType , long startTime , String splitLocations ) { } }
if ( disableHistory ) { return ; } JobID id = taskId . getJobID ( ) ; if ( ! this . jobId . equals ( id ) ) { throw new RuntimeException ( "JobId from task: " + id + " does not match expected: " + jobId ) ; } if ( null != writers ) { log ( writers , RecordTypes . Task , new Keys [ ] { Keys . TASKID , Keys . TASK_TYPE ,...
public class CaseEventSupport { /** * fire * CaseCancelled */ public void fireBeforeCaseCancelled ( String caseId , CaseFileInstance caseFile , List < Long > processInstanceIds ) { } }
final Iterator < CaseEventListener > iter = getEventListenersIterator ( ) ; if ( iter . hasNext ( ) ) { final CaseCancelEvent event = new CaseCancelEvent ( identityProvider . getName ( ) , caseId , caseFile , processInstanceIds ) ; do { iter . next ( ) . beforeCaseCancelled ( event ) ; } while ( iter . hasNext ( ) ) ; ...
public class PdfContentByte { /** * Sets the stroke color . < CODE > color < / CODE > can be an * < CODE > ExtendedColor < / CODE > . * @ param color the color */ public void setColorStroke ( Color color ) { } }
PdfXConformanceImp . checkPDFXConformance ( writer , PdfXConformanceImp . PDFXKEY_COLOR , color ) ; int type = ExtendedColor . getType ( color ) ; switch ( type ) { case ExtendedColor . TYPE_GRAY : { setGrayStroke ( ( ( GrayColor ) color ) . getGray ( ) ) ; break ; } case ExtendedColor . TYPE_CMYK : { CMYKColor cmyk = ...
public class Request { /** * Gets the query param , or returns default value * @ param queryParam the query parameter * @ param defaultValue the default value * @ return the value of the provided queryParam , or default if value is null * Example : query parameter ' id ' from the following request URI : / hello...
String value = queryParams ( queryParam ) ; return value != null ? value : defaultValue ;
public class DescribeBackupsResult { /** * A list of backups . * @ param backups * A list of backups . */ public void setBackups ( java . util . Collection < Backup > backups ) { } }
if ( backups == null ) { this . backups = null ; return ; } this . backups = new java . util . ArrayList < Backup > ( backups ) ;
public class JMOptional { /** * Gets optional . * @ param string the string * @ return the optional */ public static Optional < String > getOptional ( String string ) { } }
return Optional . ofNullable ( string ) . filter ( getIsEmpty ( ) . negate ( ) ) ;
public class JsHdrsImpl { /** * Set the Byte field which indicates the subtype of the message . * @ param value The Byte value of the Message SubType field */ final void setSubtype ( Byte value ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setSubtype" , value ) ; jmo . setField ( JsHdrAccess . SUBTYPE , value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setSubtype" ) ;
public class BingAutoSuggestSearchImpl { /** * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions . This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them . * @ param qu...
return autoSuggestWithServiceResponseAsync ( query , autoSuggestOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class BasePanel { /** * Get the SField at this index . * @ param index location of the screen field . * @ return The screen field at this location . */ public ScreenField getSField ( int index ) { } }
// If this screen cant accept a select BaseTable , find the one that can if ( ( index - DBConstants . MAIN_FIELD >= m_SFieldList . size ( ) ) || ( index < Constants . MAIN_FIELD ) ) return null ; try { return ( ScreenField ) m_SFieldList . elementAt ( index - Constants . MAIN_FIELD ) ; } catch ( ArrayIndexOutOfBoundsEx...
public class ArrayHelper { /** * Check if the passed array contains at least one < code > null < / code > element . * @ param < T > * element type * @ param aArray * The array to check . May be < code > null < / code > . * @ return < code > true < / code > only if the passed array is neither * < code > null...
if ( aArray != null ) for ( final T aObj : aArray ) if ( aObj == null ) return true ; return false ;
public class OcciIaasHandler { /** * ( non - Javadoc ) * @ see net . roboconf . target . api . TargetHandler * # terminateMachine ( net . roboconf . target . api . TargetHandlerParameters , java . lang . String ) */ @ Override public void terminateMachine ( TargetHandlerParameters parameters , String machineId ) th...
try { // TODO remove next line when APIs get compatible . . . String postfix = ( parameters . getTargetProperties ( ) . get ( CloudautomationMixins . PROVIDER_ENDPOINT ) != null ? "" : "/compute" ) ; OcciVMUtils . deleteVM ( parameters . getTargetProperties ( ) . get ( SERVER_IP_PORT ) + postfix , machineId ) ; } catch...
public class DeliveryArtifactsPicker { /** * refresh all deliveries dependencies for a particular product */ public void work ( RepositoryHandler repoHandler , DbProduct product ) { } }
if ( ! product . getDeliveries ( ) . isEmpty ( ) ) { product . getDeliveries ( ) . forEach ( delivery -> { final Set < Artifact > artifacts = new HashSet < > ( ) ; final DataFetchingUtils utils = new DataFetchingUtils ( ) ; final DependencyHandler depHandler = new DependencyHandler ( repoHandler ) ; final Set < String ...
public class ApiOvhIp { /** * Add reverse on an ip * REST : POST / ip / { ip } / reverse * @ param reverse [ required ] * @ param ipReverse [ required ] * @ param ip [ required ] */ public OvhReverseIp ip_reverse_POST ( String ip , String ipReverse , String reverse ) throws IOException { } }
String qPath = "/ip/{ip}/reverse" ; StringBuilder sb = path ( qPath , ip ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ipReverse" , ipReverse ) ; addBody ( o , "reverse" , reverse ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , Ovh...
public class HandlingEventRepositoryInMem { /** * Initilaze the in mem repository . * SpringIoC will call this init - method after the bean has bean created and * properties has been set . * @ throws ParseException */ public void init ( ) { } }
// CargoXYZ DeliverySpec deliverySpec = new DeliverySpec ( ) ; deliverySpec . setOrigin ( STOCKHOLM ) ; deliverySpec . setDestination ( MELBOURNE ) ; final Cargo cargoXYZ = new Cargo ( "XYZ" , deliverySpec ) ; registerEvent ( cargoXYZ , "2007-11-30" , HandlingEvent . Type . RECEIVE , null ) ; final CarrierMovement stoc...
public class CauchoUtil { /** * Loads a class from a classloader . If the loader is null , uses the * context class loader . * @ param name the classname , separated by ' . ' * @ param init if true , resolves the class instances * @ param loader the class loader * @ return the loaded class . */ public static ...
if ( loader == null ) loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( loader == null || loader . equals ( CauchoUtil . class . getClassLoader ( ) ) ) return Class . forName ( name ) ; else return Class . forName ( name , init , loader ) ;
public class EDLLoader { /** * Loads EDL mentions , grouped by document . Multimap keys are in alphabetical order * by document ID . */ public ImmutableListMultimap < Symbol , EDLMention > loadEDLMentionsByDocFrom ( CharSource source ) throws IOException { } }
final ImmutableList < EDLMention > edlMentions = loadEDLMentionsFrom ( source ) ; final ImmutableListMultimap . Builder < Symbol , EDLMention > byDocs = ImmutableListMultimap . < Symbol , EDLMention > builder ( ) . orderKeysBy ( SymbolUtils . byStringOrdering ( ) ) ; for ( final EDLMention edlMention : edlMentions ) { ...
public class DataItem { /** * Instructs this DataItem to write its data to the given WriteableLogRecord . * The write involves writing the length of the data as an int followed by * the data itself . The data is written at the log record ' s current position . * @ param logRecord The WriteableLogRecord to write t...
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "write" , new Object [ ] { logRecord , this } ) ; // Retrieve the data stored within this data item . This will either come from // the cached in memory copy or retrieved from disk . byte [ ] data = this . getData ( ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "W...