signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ClassContext { /** * Get a BitSet representing the bytecodes that are used in the given * method . This is useful for prescreening a method for the existence of * particular instructions . Because this step doesn ' t require building a * MethodGen , it is very fast and memory - efficient . It may all...
XMethod xmethod = XFactory . createXMethod ( clazz , method ) ; if ( cachedBitsets ( ) . containsKey ( xmethod ) ) { return cachedBitsets ( ) . get ( xmethod ) ; } Code code = method . getCode ( ) ; if ( code == null ) { return null ; } byte [ ] instructionList = code . getCode ( ) ; // Create callback UnpackedBytecode...
public class DateUtils { /** * Gets a Date fragment for any unit . * @ param date the date to work with , not null * @ param fragment the Calendar field part of date to calculate * @ param unit the time unit * @ return number of units within the fragment of the date * @ throws IllegalArgumentException if the ...
validateDateNotNull ( date ) ; final Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( date ) ; return getFragment ( calendar , fragment , unit ) ;
public class DTDSubsetImpl { /** * Convenience methods used by other classes */ public static void throwNotationException ( NotationDeclaration oldDecl , NotationDeclaration newDecl ) throws XMLStreamException { } }
throw new WstxParsingException ( MessageFormat . format ( ErrorConsts . ERR_DTD_NOTATION_REDEFD , new Object [ ] { newDecl . getName ( ) , oldDecl . getLocation ( ) . toString ( ) } ) , newDecl . getLocation ( ) ) ;
public class PortletFilterChainProxy { /** * Returns the first filter chain matching the supplied URL . * @ param request the request to match * @ return an ordered array of Filters defining the filter chain */ private List < PortletFilter > getFilters ( PortletRequest request ) { } }
for ( PortletSecurityFilterChain chain : filterChains ) { if ( chain . matches ( request ) ) { return chain . getFilters ( ) ; } } return null ;
public class ChannelRecoveryServiceRestAdapter { /** * Query to recover a channel that previously rejected messages or was * unreachable . < br > * The interface has been introduced for controlled bounce proxies . * @ param ccid * identifier of the channel to recover * @ param bpId * identifier of the bounc...
if ( ccid == null || ccid . isEmpty ( ) ) throw new JoynrHttpException ( Status . BAD_REQUEST , JOYNRMESSAGINGERROR_CHANNELNOTSET ) ; try { Channel channel = channelService . getChannel ( ccid ) ; if ( channel == null ) { // bounce proxy controller lost data channel = channelService . createChannel ( ccid , atmosphereT...
public class TokenQueue { /** * 下一个 " \ " 的位置 , 如果没有 , 则返回空 , 考虑转义和字符串文本 */ private int nextXpathNodeSeperator ( ) { } }
int start = pos ; boolean inQuote = false ; char last = 0 ; do { if ( queue . length ( ) - start == 0 ) { return - 1 ; } Character c = queue . charAt ( start ++ ) ; if ( last == 0 || last != ESC ) { if ( ( c . equals ( '\'' ) || c . equals ( '"' ) ) ) inQuote = ! inQuote ; if ( inQuote ) continue ; } if ( c == '/' ) { ...
public class PolylineSplitMerge { /** * Returns the previous corner in the list */ Element < Corner > previous ( Element < Corner > e ) { } }
if ( e . previous == null ) { return list . getTail ( ) ; } else { return e . previous ; }
public class Resource { /** * Subtracts a given resource from the current resource . The results is never negative . */ public Resource subtractAbsolute ( Resource other ) { } }
double cpuDifference = this . getCpu ( ) - other . getCpu ( ) ; double extraCpu = Math . max ( 0 , cpuDifference ) ; ByteAmount ramDifference = this . getRam ( ) . minus ( other . getRam ( ) ) ; ByteAmount extraRam = ByteAmount . ZERO . max ( ramDifference ) ; ByteAmount diskDifference = this . getDisk ( ) . minus ( ot...
public class DBLogger { /** * THese always result in the session being closed ! * @ param msg The error message * @ param t The Throwable to report * @ return Fatal data store exception . */ public static RuntimeException newFatalDataStore ( String msg , Throwable t ) { } }
return newEx ( FATAL_DATA_STORE_EXCEPTION , msg , t ) ;
public class ObjectCacheUnitImpl { /** * Create a DistributedObjectCache from a cacheConfig object . * Entry ( only call this method once per cache name ) config ! = null config . distributedObjectCache = = null Exit * newly created DistributedObjectCache * @ param config * @ return The returned object will be ...
final String methodName = "createDistributedObjectCache()" ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , methodName + " cacheName=" + ( config != null ? config . getCacheName ( ) : "null" ) ) ; DCache dCache = ServerCache . createCache ( config . getCacheName ( ) , config ) ; config . setCache ( dCache ) ; Distrib...
public class HomographyTotalLeastSquares { /** * Constructs equation for elements 6 to 8 in H */ void constructA678 ( ) { } }
final int N = X1 . numRows ; // Pseudo - inverse of hat ( p ) computePseudo ( X1 , P_plus ) ; DMatrixRMaj PPpXP = new DMatrixRMaj ( 1 , 1 ) ; DMatrixRMaj PPpYP = new DMatrixRMaj ( 1 , 1 ) ; computePPXP ( X1 , P_plus , X2 , 0 , PPpXP ) ; computePPXP ( X1 , P_plus , X2 , 1 , PPpYP ) ; DMatrixRMaj PPpX = new DMatrixRMaj (...
public class DaoTemplate { /** * 根据SQL语句查询结果 < br > * SQL语句可以是非完整SQL语句 , 可以只提供查询的条件部分 ( 例如WHERE部分 ) < br > * 此方法会自动补全SELECT * FROM [ tableName ] 部分 , 这样就无需关心表名 , 直接提供条件即可 * @ param sql SQL语句 * @ param params SQL占位符中对应的参数 * @ return 记录 * @ throws SQLException SQL执行异常 */ public List < Entity > findBySql ( Str...
String selectKeyword = StrUtil . subPre ( sql . trim ( ) , 6 ) . toLowerCase ( ) ; if ( false == "select" . equals ( selectKeyword ) ) { sql = "SELECT * FROM " + this . tableName + " " + sql ; } return db . query ( sql , new EntityListHandler ( ) , params ) ;
public class AbstractConsumerQuery { /** * / * ( non - Javadoc ) * @ see net . timewalker . ffmq4 . network . packet . AbstractPacket # serializeTo ( net . timewalker . ffmq4 . utils . RawDataOutputStream ) */ @ Override protected void serializeTo ( RawDataBuffer out ) { } }
super . serializeTo ( out ) ; out . writeInt ( consumerId . asInt ( ) ) ;
public class HashFunctions { /** * Fowler - Noll - Vo 32 bit hash ( FNV - 1a ) for long key . This is big - endian version ( native endianess of JVM ) . < br / > < p / > * < h3 > Algorithm < / h3 > < p / > * < pre > * hash = offset _ basis * for each octet _ of _ data to be hashed * hash = hash xor octet _ of...
long hash = FNV_BASIS ; hash ^= c >>> 56 ; hash *= FNV_PRIME_32 ; hash ^= 0xFFL & ( c >>> 48 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFFL & ( c >>> 40 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFFL & ( c >>> 32 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFFL & ( c >>> 24 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFFL & ( c >>> 16 ) ; hash *=...
public class ArrayBasedStrategy { /** * - - - REMOVE ALL ENDPOINTS OF THE SPECIFIED NODE - - - */ @ Override public boolean remove ( String nodeID ) { } }
Endpoint endpoint ; boolean found = false ; for ( int i = 0 ; i < endpoints . length ; i ++ ) { endpoint = endpoints [ i ] ; if ( nodeID . equals ( endpoint . getNodeID ( ) ) ) { found = true ; if ( endpoints . length == 1 ) { endpoints = new Endpoint [ 0 ] ; } else { Endpoint [ ] copy = new Endpoint [ endpoints . leng...
public class MediaApi { /** * Complete an interaction * Marks the specified interaction as complete . * @ param mediatype The media channel . ( required ) * @ param id The ID of the interaction to complete . ( required ) * @ param completeData Request parameters . ( optional ) * @ return ApiSuccessResponse ...
ApiResponse < ApiSuccessResponse > resp = completeWithHttpInfo ( mediatype , id , completeData ) ; return resp . getData ( ) ;
public class CDDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setXocUnits ( Integer newXocUnits ) { } }
Integer oldXocUnits = xocUnits ; xocUnits = newXocUnits ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . CDD__XOC_UNITS , oldXocUnits , xocUnits ) ) ;
public class GeneralizedCounter { /** * for testing purposes only */ public static void main ( String [ ] args ) { } }
Object [ ] a1 = new Object [ ] { "a" , "b" } ; Object [ ] a2 = new Object [ ] { "a" , "b" } ; System . out . println ( a1 . equals ( a2 ) ) ; GeneralizedCounter < String > gc = new GeneralizedCounter < String > ( 3 ) ; gc . incrementCount ( Arrays . asList ( new String [ ] { "a" , "j" , "x" } ) , 3.0 ) ; gc . increment...
public class AmazonSnowballClient { /** * Creates an address for a Snowball to be shipped to . In most regions , addresses are validated at the time of * creation . The address you provide must be located within the serviceable area of your region . If the address is * invalid or unsupported , then an exception is ...
request = beforeClientExecution ( request ) ; return executeCreateAddress ( request ) ;
public class AmazonElasticLoadBalancingClient { /** * Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new * set of policies . At this time , only the back - end server authentication policy type can be applied to the instance * ports ; this policy type i...
request = beforeClientExecution ( request ) ; return executeSetLoadBalancerPoliciesForBackendServer ( request ) ;
public class ActionMenuView { /** * Measure a child view to fit within cell - based formatting . The child ' s width * will be measured to a whole multiple of cellSize . * < p > Sets the expandable and cellsUsed fields of LayoutParams . * @ param child Child to measure * @ param cellSize Size of one cell * @ ...
final LayoutParams lp = ( LayoutParams ) child . getLayoutParams ( ) ; final int childHeightSize = MeasureSpec . getSize ( parentHeightMeasureSpec ) - parentHeightPadding ; final int childHeightMode = MeasureSpec . getMode ( parentHeightMeasureSpec ) ; final int childHeightSpec = MeasureSpec . makeMeasureSpec ( childHe...
public class PerfCounterMap { /** * Gets a performance counter . * @ param counter the name of the counter to retrieve ( typically the procedure name ) . A new counter is created on the fly if none previously existed in the map . */ public PerfCounter get ( String counter ) { } }
// Admited : could get a little race condition at the very beginning , but all that ' ll happen is that we ' ll lose a handful of tracking event , a loss far outweighed by overall reduced contention . if ( ! this . Counters . containsKey ( counter ) ) this . Counters . put ( counter , new PerfCounter ( false ) ) ; retu...
public class U { /** * Documented , # has */ public static < K , V > boolean has ( final Map < K , V > object , final K key ) { } }
return object . containsKey ( key ) ;
public class AipFace { /** * 人脸检测接口 * @ param image - 图片信息 ( * * 总数据大小应小于10M * * ) , 图片上传方式根据image _ type来判断 * @ param imageType - 图片类型 * * BASE64 * * : 图片的base64值 , base64编码后的图片数据 , 需urlencode , 编码后的图片大小不超过2M ; * * URL * * : 图片的 URL地址 ( 可能由于网络等原因导致下载图片时间过长 ) * * ; FACE _ TOKEN * * : 人脸图片的唯一标识 , 调用人脸检测接口时 , 会为每个人脸图...
AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; request . addBody ( "image" , image ) ; request . addBody ( "image_type" , imageType ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( FaceConsts . DETECT ) ; request . setBodyFormat ( EBodyFormat . RAW_JSON ) ; postOpe...
public class Dates { /** * Returns an instance of < code > java . util . Calendar < / code > that is suitably * initialised for working with the specified date . * @ param date a date instance * @ return a < code > java . util . Calendar < / code > */ public static Calendar getCalendarInstance ( final Date date )...
Calendar instance ; if ( date instanceof DateTime ) { final DateTime dateTime = ( DateTime ) date ; if ( dateTime . getTimeZone ( ) != null ) { instance = Calendar . getInstance ( dateTime . getTimeZone ( ) ) ; } else if ( dateTime . isUtc ( ) ) { instance = Calendar . getInstance ( TimeZones . getUtcTimeZone ( ) ) ; }...
public class SipAnnotationDeploymentProcessor { /** * Process web annotations . */ @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; // Commented for http : / / code . google . com / p / sipservlets / issues / detail ? id = 168 // When no sip . xml but annotations only , Application is not recognized as SIP App by AS7 // SipMetaData sipMetaData = deploymentUnit . getAttachm...
public class DataLoader { /** * Creates new DataLoader with the specified batch loader function and default options * ( batching , caching and unlimited batch size ) where the batch loader function returns a list of * { @ link org . dataloader . Try } objects . * If its important you to know the exact status of e...
return newDataLoaderWithTry ( batchLoadFunction , null ) ;
public class AbstractInputHandler { /** * Merges all Maps into one single map . * All maps are merged according to next algorithm : * prefix < / class name stored in map > . < / map key > * Fields encodedQuery and addPrefix are not used and might be removed before final release * @ param encodedQuery Original S...
Map < String , Object > mergedMap = new HashMap < String , Object > ( ) ; String className = null ; for ( Map < String , Object > map : mapList ) { className = InputUtils . getClassName ( map ) ; for ( String key : map . keySet ( ) ) { if ( InputUtils . isClassNameKey ( key ) == false ) { if ( className != null && addP...
public class HttpRequest { /** * 执行Reuqest请求 * @ param isAsync 是否异步 * @ return this */ public HttpResponse execute ( boolean isAsync ) { } }
// 初始化URL urlWithParamIfGet ( ) ; // 编码URL if ( this . encodeUrlParams ) { this . url = HttpUtil . encodeParams ( this . url , this . charset ) ; } // 初始化 connection initConnecton ( ) ; // 发送请求 send ( ) ; // 手动实现重定向 HttpResponse httpResponse = sendRedirectIfPosible ( ) ; // 获取响应 if ( null == httpResponse ) { httpRespon...
public class MetricsImpl { /** * Retrieve metric data . * Gets metric values for multiple metrics . * @ param appId ID of the application . This is Application ID from the API Access settings blade in the Azure portal . * @ param body The batched metrics query . * @ throws IllegalArgumentException thrown if par...
if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( body == null ) { throw new IllegalArgumentException ( "Parameter body is required and cannot be null." ) ; } Validator . validate ( body ) ; return service . getMultiple ( appId , body , this . clien...
public class SystemStreamRuleImpl { /** * ( non - Javadoc ) * @ see * ch . powerunit . rules . TestListenerRule # onStart ( ch . powerunit . TestContext ) */ @ Override public void onStart ( TestContext < Object > context ) { } }
oldErr = System . err ; oldOut = System . out ; try { System . setErr ( remplacementErr ) ; System . setOut ( remplacementOut ) ; } catch ( SecurityException e ) { // ignored }
public class ImageZoomPanel { /** * Change the image being displayed . * @ param image The new image which will be displayed . */ public synchronized void setBufferedImage ( BufferedImage image ) { } }
// assume the image was initially set before the GUI was invoked if ( checkEventDispatch && this . img != null ) { if ( ! SwingUtilities . isEventDispatchThread ( ) ) throw new RuntimeException ( "Changed image when not in GUI thread?" ) ; } this . img = image ; if ( image != null ) updateSize ( image . getWidth ( ) , ...
public class BatchGetDeploymentGroupsRequest { /** * The names of the deployment groups . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDeploymentGroupNames ( java . util . Collection ) } or { @ link # withDeploymentGroupNames ( java . util . Collection ...
if ( this . deploymentGroupNames == null ) { setDeploymentGroupNames ( new com . amazonaws . internal . SdkInternalList < String > ( deploymentGroupNames . length ) ) ; } for ( String ele : deploymentGroupNames ) { this . deploymentGroupNames . add ( ele ) ; } return this ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcContextDependentMeasure ( ) { } }
if ( ifcContextDependentMeasureEClass == null ) { ifcContextDependentMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 660 ) ; } return ifcContextDependentMeasureEClass ;
public class Instance { /** * Allocates a simple slot on this TaskManager instance . This method returns { @ code null } , if no slot * is available at the moment . * @ return A simple slot that represents a task slot on this TaskManager instance , or null , if the * TaskManager instance has no more slots availab...
synchronized ( instanceLock ) { if ( isDead ) { throw new InstanceDiedException ( this ) ; } Integer nextSlot = availableSlots . poll ( ) ; if ( nextSlot == null ) { return null ; } else { SimpleSlot slot = new SimpleSlot ( this , location , nextSlot , taskManagerGateway ) ; allocatedSlots . add ( slot ) ; return slot ...
public class host_cpu_core { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
host_cpu_core_responses result = ( host_cpu_core_responses ) service . get_payload_formatter ( ) . string_to_resource ( host_cpu_core_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . messa...
public class JavaZipFileSystem { /** * { @ inheritDoc } */ public boolean isFile ( final VirtualFile mountPoint , final VirtualFile target ) { } }
final ZipNode zipNode = rootNode . find ( mountPoint , target ) ; return zipNode != null && zipNode . entry != null ;
public class TransmissionDataIterator { /** * Returns a previously allocated instance of this class to the pool */ protected void release ( ) { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "release" ) ; if ( ! transmissionsRemaining ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "no more transmissions remaining - repooling" ) ; // Ensure we release the byte buffers back into the pool if ( buffer != null ) { buffer . release ( ) ; ...
public class Waiter { /** * Creates a new ActivityMonitor and returns it * @ return an ActivityMonitor */ private ActivityMonitor getActivityMonitor ( ) { } }
IntentFilter filter = null ; ActivityMonitor activityMonitor = instrumentation . addMonitor ( filter , null , false ) ; return activityMonitor ;
public class CmsResourceWrapperUtils { /** * Escapes the value of a property in OpenCms to be displayed * correctly in a property file . < p > * Mainly handles all escaping sequences that start with a backslash . < p > * @ see # unescapeString ( String ) * @ param value the value with the string to be escaped ...
Map < String , String > substitutions = new HashMap < String , String > ( ) ; substitutions . put ( "\n" , "\\n" ) ; substitutions . put ( "\t" , "\\t" ) ; substitutions . put ( "\r" , "\\r" ) ; return CmsStringUtil . substitute ( value , substitutions ) ;
public class BELValidatorServiceImpl { /** * { @ inheritDoc } */ @ Override public BELParseResults validateBELScript ( File belScriptFile ) { } }
try { String belScriptText = FileUtils . readFileToString ( belScriptFile , UTF_8 ) ; return validateBELScript ( belScriptText ) ; } catch ( IOException e ) { throw new MissingEncodingException ( UTF_8 , e ) ; }
public class SwingUtil { /** * Restores anti - aliasing in the supplied graphics context to its original setting . * @ param rock the results of a previous call to { @ link # activateAntiAliasing } or null , in * which case this method will NOOP . This alleviates every caller having to conditionally avoid * calli...
if ( rock != null ) { gfx . setRenderingHints ( ( RenderingHints ) rock ) ; }
public class PubSubOutputHandler { /** * sendSilenceMessage may be called from InternalOutputStream * when a Nack is recevied */ public void sendSilenceMessage ( long startStamp , long endStamp , long completedPrefix , boolean requestedOnly , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResour...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendSilenceMessage" , new Object [ ] { new Long ( startStamp ) , new Long ( endStamp ) , new Long ( completedPrefix ) , new Integer ( priority ) , reliability } ) ; ControlSilence sMsg ; try { // Create new Silence message ...
public class CfgParser { /** * Compute the outside probabilities moving downward from the top of the tree . */ private void downwardChartPass ( CfgParseChart chart ) { } }
Preconditions . checkState ( chart . getInsideCalculated ( ) ) ; // Calculate root marginal , which is not included in the rest of the pass . // Also compute the partition function . Factor rootOutside = chart . getOutsideEntries ( 0 , chart . chartSize ( ) - 1 ) ; Factor rootInside = chart . getInsideEntries ( 0 , cha...
public class Adresse { /** * Liefert die Strasse in einer abgekuerzten Schreibweise . * @ return z . B . " Badstr . " */ public String getStrasseKurz ( ) { } }
if ( PATTERN_STRASSE . matcher ( strasse ) . matches ( ) ) { return strasse . substring ( 0 , StringUtils . lastIndexOfIgnoreCase ( strasse , "stra" ) + 3 ) + '.' ; } else { return strasse ; }
public class KeyValueHandler { /** * Encodes a { @ link GetRequest } into its lower level representation . * Depending on the flags set on the { @ link GetRequest } , the appropriate opcode gets chosen . Currently , a regular * get , as well as " get and touch " and " get and lock " are supported . Latter variants ...
byte opcode ; ByteBuf extras ; if ( msg . lock ( ) ) { opcode = OP_GET_AND_LOCK ; extras = ctx . alloc ( ) . buffer ( ) . writeInt ( msg . expiry ( ) ) ; } else if ( msg . touch ( ) ) { opcode = OP_GET_AND_TOUCH ; extras = ctx . alloc ( ) . buffer ( ) . writeInt ( msg . expiry ( ) ) ; } else { opcode = OP_GET ; extras ...
public class CacheAction { @ Execute public ActionResponse index ( final CacheForm form ) { } }
validate ( form , messages -> { } , ( ) -> asHtml ( virtualHost ( path_Error_ErrorJsp ) ) ) ; if ( isLoginRequired ( ) ) { return redirectToLogin ( ) ; } Map < String , Object > doc = null ; try { doc = searchService . getDocumentByDocId ( form . docId , queryHelper . getCacheResponseFields ( ) , getUserBean ( ) ) . or...
public class PropertyResolver { /** * Resolve a property from System Properties ( aka $ { key } ) key : defval is * supported and if key not found on SysProps , defval will be returned * @ param s * @ return resolved string or null if not found in System Properties and no * defval */ private String resolveStrin...
int pos = s . indexOf ( ":" , 0 ) ; if ( pos == - 1 ) return System . getProperty ( s ) ; String key = s . substring ( 0 , pos ) ; String defval = s . substring ( pos + 1 ) ; String val = System . getProperty ( key ) ; if ( val != null ) return val ; else return defval ;
public class UserLayoutManagerFactory { /** * Obtain a regular user layout manager implementation ( which allows transient layout * alterations ) . The specific layout type depends on whether the user is a guest user . * @ return an < code > IUserLayoutManager < / code > value */ public IUserLayoutManager getUserLa...
final IUserLayoutManager userLayoutManager = ( IUserLayoutManager ) this . beanFactory . getBean ( USER_LAYOUT_MANAGER_PROTOTYPE_BEAN_NAME , person , profile ) ; if ( person . isGuest ( ) ) { return new ImmutableTransientUserLayoutManagerWrapper ( userLayoutManager ) ; } return new TransientUserLayoutManagerWrapper ( u...
public class TemperatureConversion { /** * Convert a temperature value from another temperature scale into the Celsius temperature scale . * @ param from TemperatureScale * @ param temperature value from other scale * @ return converted temperature value in degrees centigrade */ public static double convertToCels...
switch ( from ) { case FARENHEIT : return convertFarenheitToCelsius ( temperature ) ; case CELSIUS : return temperature ; case KELVIN : return convertKelvinToCelsius ( temperature ) ; case RANKINE : return convertRankineToCelsius ( temperature ) ; default : throw ( new RuntimeException ( "Invalid termpature conversion"...
public class FileSplitter { /** * This method writes a partial input file to a split file * @ param splitDir split file directory * @ param data data * @ return < code > File < / code > new split file */ private static File writePartToFile ( File splitDir , List < String > data ) { } }
BufferedWriter writer = null ; File splitFile ; try { splitFile = File . createTempFile ( "split-" , ".part" , splitDir ) ; writer = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( splitFile . getAbsoluteFile ( ) , false ) , DataUtilDefaults . charSet ) ) ; for ( String item : data ) { writer . wri...
public class RestCallbackBuilder { /** * create rest callback implementation . * @ param pview view of the * @ param pdata data given from server * @ param psession session * @ param pcallbackOnSuccess on success callback * @ param < P > presenter type * @ param < D > data type given to the server * @ par...
return new RestCallbackImpl < > ( pview , pdata , psession , pcallbackOnSuccess ) ;
public class AcceptAllSocketFactory { /** * In the case of this factory the intent is to ensure that a truststore is not set , * as this does not make sense in the context of an accept - all policy */ @ Override public void initWithNiwsConfig ( IClientConfig clientConfig ) { } }
if ( clientConfig == null ) { return ; } if ( clientConfig . getOrDefault ( CommonClientConfigKey . TrustStore ) != null ) { throw new IllegalArgumentException ( "Client configured with an AcceptAllSocketFactory cannot utilize a truststore" ) ; }
public class GeometryRendererImpl { public void onGeometryIndexSelected ( GeometryIndexSelectedEvent event ) { } }
for ( GeometryIndex index : event . getIndices ( ) ) { update ( event . getGeometry ( ) , index , false ) ; }
public class CmsPropertyChange { /** * Performs the main property change value operation on the resource property . < p > * @ param recursive true , if the property value has to be changed recursively , otherwise false * @ return true , if the property values are changed successfully , otherwise false * @ throws ...
// on recursive property changes display " please wait " screen if ( recursive && ! DIALOG_WAIT . equals ( getParamAction ( ) ) ) { // return false , this will trigger the " please wait " screen return false ; } // lock the selected resource checkLock ( getParamResource ( ) ) ; // change the property values List change...
public class HeapCompactOrderedSketch { /** * Converts the given UpdateSketch to this compact form . * @ param sketch the given UpdateSketch * @ return a CompactSketch */ static CompactSketch compact ( final UpdateSketch sketch ) { } }
final int curCount = sketch . getRetainedEntries ( true ) ; long thetaLong = sketch . getThetaLong ( ) ; boolean empty = sketch . isEmpty ( ) ; thetaLong = thetaOnCompact ( empty , curCount , thetaLong ) ; empty = emptyOnCompact ( curCount , thetaLong ) ; final short seedHash = sketch . getSeedHash ( ) ; final long [ ]...
public class GoroService { /** * Create an intent that contains a task that should be scheduled * on a defined queue . The Service will run in the foreground and display notification . * Intent can be used as an argument for * { @ link android . content . Context # startService ( android . content . Intent ) } ...
return foregroundTaskIntent ( context , Goro . DEFAULT_QUEUE , task , notificationId , notification ) ;
public class GitlabAPI { /** * Get a list of projects by pagination accessible by the authenticated user . * @ param pagination * @ return * @ throws IOException on gitlab api call error */ public List < GitlabProject > getProjectsWithPagination ( Pagination pagination ) throws IOException { } }
StringBuilder tailUrl = new StringBuilder ( GitlabProject . URL ) ; if ( pagination != null ) { Query query = pagination . asQuery ( ) ; tailUrl . append ( query . toString ( ) ) ; } return Arrays . asList ( retrieve ( ) . method ( GET ) . to ( tailUrl . toString ( ) , GitlabProject [ ] . class ) ) ;
public class DateUtil { /** * Adds a number of hours to a calendar returning a new object . * The original { @ code Date } is unchanged . * @ param calendar the calendar , not null * @ param amount the amount to add , may be negative * @ return the new { @ code Date } with the amount added * @ throws IllegalA...
return roll ( calendar , amount , CalendarUnit . HOUR ) ;
public class SnsMessageUnmarshaller { /** * Unmarshall into a { @ link SnsSubscriptionConfirmation } object . * @ param message JSON message . * @ return Builder with sub properties filled in . Base properties are added by * { @ link # unmarshallBase ( SnsMessage . Builder , SnsJsonNode ) } . */ private SnsMessag...
return SnsSubscriptionConfirmation . builder ( client ) . withSubscribeUrl ( message . getString ( SUBSCRIBE_URL ) ) . withToken ( message . getString ( TOKEN ) ) . withMessage ( message . getString ( MESSAGE ) ) ;
public class PgDatabaseMetaData { /** * { @ inheritDoc } * < p > From PostgreSQL 9.0 + return the keywords from pg _ catalog . pg _ get _ keywords ( ) < / p > * @ return a comma separated list of keywords we use * @ throws SQLException if a database access error occurs */ @ Override public String getSQLKeywords (...
connection . checkClosed ( ) ; if ( keywords == null ) { if ( connection . haveMinimumServerVersion ( ServerVersion . v9_0 ) ) { // Exclude SQL : 2003 keywords ( https : / / github . com / ronsavage / SQL / blob / master / sql - 2003-2 . bnf ) // from the returned list , ugly but required by jdbc spec . String sql = "s...
public class AnimaQuery { /** * Paging query results by sql * @ param sql sql statement * @ param pageRow page param * @ return Page */ public Page < T > page ( String sql , PageRow pageRow ) { } }
return this . page ( sql , paramValues , pageRow ) ;
public class TileBasedLayerClient { /** * Create a new OSM layer with the given ID and tile configuration . The layer will be configured * with the default OSM tile services so you don ' t have to specify these URLs yourself . * @ param id The unique ID of the layer . * @ param conf The tile configuration . * @...
OsmLayer layer = new OsmLayer ( id , conf ) ; layer . addUrls ( Arrays . asList ( DEFAULT_OSM_URLS ) ) ; return layer ;
public class CmsImportVersion7 { /** * Sets the organizational unit flags . < p > * @ param orgUnitFlags the flags to set */ public void setOrgUnitFlags ( String orgUnitFlags ) { } }
try { m_orgUnitFlags = Integer . parseInt ( orgUnitFlags ) ; } catch ( Throwable e ) { setThrowable ( e ) ; }
public class Choice { /** * Maps the choices with the specified function . */ public < R > Choice < R > transform ( final Function < ? super T , R > function ) { } }
checkNotNull ( function ) ; final Choice < T > thisChoice = this ; return new Choice < R > ( ) { @ Override protected Iterator < R > iterator ( ) { return Iterators . transform ( thisChoice . iterator ( ) , function ) ; } } ;
public class AccordionPanel { /** * Remove the given component from this accordion * @ param component The component to remove */ public void removeFromAccordion ( JComponent component ) { } }
CollapsiblePanel collapsiblePanel = collapsiblePanels . get ( component ) ; if ( collapsiblePanel != null ) { contentPanel . remove ( collapsiblePanel ) ; collapsiblePanels . remove ( component ) ; revalidate ( ) ; }
public class ListRunsResult { /** * Information about the runs . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRuns ( java . util . Collection ) } or { @ link # withRuns ( java . util . Collection ) } if you want to override the * existing values . *...
if ( this . runs == null ) { setRuns ( new java . util . ArrayList < Run > ( runs . length ) ) ; } for ( Run ele : runs ) { this . runs . add ( ele ) ; } return this ;
public class RaftSessionListener { /** * Closes the session event listener . * @ return A completable future to be completed once the listener is closed . */ public CompletableFuture < Void > close ( ) { } }
protocol . unregisterPublishListener ( state . getSessionId ( ) ) ; return CompletableFuture . completedFuture ( null ) ;
public class DynamicRepositoryDecoratorRegistryImpl { /** * Decorates a { @ link Repository } with one or more { @ link DynamicDecorator } s . , based on the { @ link * DecoratorConfiguration } entity . */ @ SuppressWarnings ( "unchecked" ) private Repository < Entity > decorateRepository ( Repository < Entity > repo...
Map < String , Map < String , Object > > parameterMap = getParameterMap ( configuration ) ; List < DecoratorParameters > decoratorParameters = configuration . getDecoratorParameters ( ) . collect ( toList ( ) ) ; for ( DecoratorParameters decoratorParam : decoratorParameters ) { DynamicRepositoryDecoratorFactory factor...
public class JsHdrsImpl { /** * Get the identity of the destination definition ( not localisation ) * Javadoc description supplied by CommonMessageHeaders interface . */ public final SIBUuid12 getGuaranteedTargetDestinationDefinitionUUID ( ) { } }
byte [ ] b = ( byte [ ] ) getHdr2 ( ) . getField ( JsHdr2Access . GUARANTEED_SET_TARGETDESTDEFUUID ) ; if ( b != null ) return new SIBUuid12 ( b ) ; return null ;
public class UpdateClusterUtils { /** * Creates a replica of the node with the new partitions list * @ param node The node whose replica we are creating * @ param partitionsList The new partitions list * @ return Replica of node with new partitions list */ public static Node updateNode ( Node node , List < Intege...
return new Node ( node . getId ( ) , node . getHost ( ) , node . getHttpPort ( ) , node . getSocketPort ( ) , node . getAdminPort ( ) , node . getZoneId ( ) , partitionsList ) ;
public class DoubleArrayTrie { /** * 从磁盘加载 , 需要额外提供值 * @ param path * @ param value * @ return */ public boolean load ( String path , V [ ] value ) { } }
if ( ! ( IOAdapter == null ? loadBaseAndCheckByFileChannel ( path ) : load ( ByteArrayStream . createByteArrayStream ( path ) , value ) ) ) return false ; v = value ; return true ;
public class ListContext { /** * Create a new { @ link ArrayList } instance adding all values of the given * lists together . The second list will essentially be added after the * first list . Note that any duplicates between lists will remain as * duplicates . * @ param list1 The first list to merge * @ para...
"unchecked" , "rawtypes" } ) public List < ? > mergeLists ( List < ? > list1 , List < ? > list2 ) { List list = new ArrayList ( list1 . size ( ) + list2 . size ( ) ) ; list . addAll ( list1 ) ; list . addAll ( list2 ) ; return list ;
public class RowProcessingPublisher { /** * Closes consumers of this { @ link RowProcessingPublisher } . Usually this * will be done automatically when * { @ link # runRowProcessing ( Queue , TaskListener ) } is invoked . */ public void closeConsumers ( ) { } }
final List < RowProcessingConsumer > configurableConsumers = getConfigurableConsumers ( ) ; final TaskRunner taskRunner = _publishers . getTaskRunner ( ) ; for ( RowProcessingConsumer consumer : configurableConsumers ) { TaskRunnable task = createCloseTask ( consumer , null ) ; taskRunner . run ( task ) ; }
public class Hierarchy { /** * Look up the field referenced by given FieldInstruction , returning it as * an { @ link XField XField } object . * @ param fins * the FieldInstruction * @ param cpg * the ConstantPoolGen used by the class containing the * instruction * @ return an XField object representing t...
String className = fins . getClassName ( cpg ) ; String fieldName = fins . getFieldName ( cpg ) ; String fieldSig = fins . getSignature ( cpg ) ; boolean isStatic = ( fins . getOpcode ( ) == Const . GETSTATIC || fins . getOpcode ( ) == Const . PUTSTATIC ) ; XField xfield = findXField ( className , fieldName , fieldSig ...
public class I18nModuleBuilder { /** * Adds the source for the locale specific i18n resource if it exists . * @ param list * The list of source files to add the i18n resource to * @ param bundleRoot * The module path for the bundle root ( e . g . ' foo / nls ' ) * @ param bundleRootRes * The bundle root res...
if ( availableLocales != null && ! availableLocales . contains ( locale ) ) { return false ; } boolean result = false ; URI uri = bundleRootRes . getURI ( ) ; URI testUri = uri . resolve ( locale + "/" + resource + ".js" ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $ IResource testResource = aggregator . newResource ( ...
public class Slf4jToFileBenchmark { /** * structured logging without parametrization with logstash */ @ Warmup ( iterations = 5 ) @ Measurement ( iterations = 5 ) @ Benchmark public void logstashStructuredLogging1Calls ( ) { } }
loggerLogstash . info ( "Event with double and boolean" , keyValue ( "varDouble" , 1.2 ) , keyValue ( "varBoolean" , false ) ) ;
public class SamzaEntranceProcessingItem { /** * Implement Samza Task */ @ Override public void init ( Config config , TaskContext context ) throws Exception { } }
String yarnConfHome = config . get ( SamzaConfigFactory . YARN_CONF_HOME_KEY ) ; if ( yarnConfHome != null && yarnConfHome . length ( ) > 0 ) // if the property is set , otherwise , assume we are running in // local mode and ignore this SystemsUtils . setHadoopConfigHome ( yarnConfHome ) ; String filename = config . ge...
public class ZKClient { /** * When the listener is set , it will receive the { @ link LifecycleListener # onConnected ( ) } callback * right away if ZooKeeper is already connected . This guarantees that you will never miss the * connected event irrelevant of whether you set the listener before or after calling * ...
if ( listener == null ) throw new NullPointerException ( "listener is null" ) ; synchronized ( _lock ) { if ( _listeners == null || ! _listeners . contains ( listener ) ) { Set < LifecycleListener > listeners = new HashSet < LifecycleListener > ( ) ; if ( _listeners != null ) listeners . addAll ( _listeners ) ; listene...
public class ConcatVectorTable { /** * Deep comparison for equality of value , plus tolerance , for every concatvector in the table , plus dimensional * arrangement . This is mostly useful for testing . * @ param other the vector table to compare against * @ param tolerance the tolerance to use in value compariso...
if ( ! Arrays . equals ( other . getDimensions ( ) , getDimensions ( ) ) ) return false ; for ( int [ ] assignment : this ) { if ( ! getAssignmentValue ( assignment ) . get ( ) . valueEquals ( other . getAssignmentValue ( assignment ) . get ( ) , tolerance ) ) { return false ; } } return true ;
public class AnalyticFormulas { /** * Calculates the Black - Scholes option value of a call , i . e . , the payoff max ( S ( T ) - K , 0 ) , where S follows a log - normal process with constant log - volatility . * @ param initialStockValue The spot value of the underlying . * @ param riskFreeRate The risk free rat...
return blackScholesGeneralizedOptionValue ( initialStockValue * Math . exp ( riskFreeRate * optionMaturity ) , // forward volatility , optionMaturity , optionStrike , Math . exp ( - riskFreeRate * optionMaturity ) // payoff unit ) ;
public class PartialMerkleTree { /** * Based on CPartialMerkleTree : : TraverseAndBuild in Bitcoin Core . */ private static void traverseAndBuild ( int height , int pos , List < Sha256Hash > allLeafHashes , byte [ ] includeBits , List < Boolean > matchedChildBits , List < Sha256Hash > resultHashes ) { } }
boolean parentOfMatch = false ; // Is this node a parent of at least one matched hash ? for ( int p = pos << height ; p < ( pos + 1 ) << height && p < allLeafHashes . size ( ) ; p ++ ) { if ( Utils . checkBitLE ( includeBits , p ) ) { parentOfMatch = true ; break ; } } // Store as a flag bit . matchedChildBits . add ( ...
public class BamManager { /** * These methods aim to provide a very simple , safe and quick way of accessing to a small fragment of the BAM / CRAM file . * This must not be used in production for reading big data files . It returns a maximum of 50,000 SAM records , * you can use iterator methods for reading more re...
return query ( null , filters , null , SAMRecord . class ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Boolean } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "includePathSegment" , scope = GetDescendants . class ) public JAXBElement < Boolean > createGetD...
return new JAXBElement < Boolean > ( _GetDescendantsIncludePathSegment_QNAME , Boolean . class , GetDescendants . class , value ) ;
public class XMLOutputOperator { /** * Formats the complete tag tree to an output stream */ public void dumpTo ( AreaTree tree , PrintWriter out ) { } }
if ( produceHeader ) out . println ( "<?xml version=\"1.0\"?>" ) ; out . println ( "<areaTree base=\"" + HTMLEntities ( tree . getRoot ( ) . getPage ( ) . getSourceURL ( ) . toString ( ) ) + "\">" ) ; recursiveDump ( tree . getRoot ( ) , 1 , out ) ; out . println ( "</areaTree>" ) ;
public class MathUtility { /** * 使用log - sum - exp技巧来归一化一组对数值 * @ param predictionScores */ public static void normalizeExp ( Map < String , Double > predictionScores ) { } }
Set < Map . Entry < String , Double > > entrySet = predictionScores . entrySet ( ) ; double max = Double . NEGATIVE_INFINITY ; for ( Map . Entry < String , Double > entry : entrySet ) { max = Math . max ( max , entry . getValue ( ) ) ; } double sum = 0.0 ; // 通过减去最大值防止浮点数溢出 for ( Map . Entry < String , Double > entry :...
public class PatternsImpl { /** * Updates a pattern . * @ param appId The application ID . * @ param versionId The version ID . * @ param patternId The pattern ID . * @ param pattern An object representing a pattern . * @ param serviceCallback the async ServiceCallback to handle successful and failed response...
return ServiceFuture . fromResponse ( updatePatternWithServiceResponseAsync ( appId , versionId , patternId , pattern ) , serviceCallback ) ;
public class CacheOnDisk { /** * Call this method when the alarm is triggered . It is being checked to see whether a disk cleanup is scheduled to * run . */ public void alarm ( final Object alarmContext ) { } }
final String methodName = "alarm()" ; synchronized ( this ) { if ( ! stopping && ! this . htod . invalidationBuffer . isDiskClearInProgress ( ) ) { this . htod . invalidationBuffer . invokeBackgroundInvalidation ( HTODInvalidationBuffer . SCAN ) ; } else if ( stopping ) { traceDebug ( methodName , "cacheName=" + this ....
public class SqlLineOpts { /** * The save directory if HOME / . sqlline / on UNIX , and HOME / sqlline / on * Windows . * @ return save directory */ public static File saveDir ( ) { } }
String dir = System . getProperty ( "sqlline.rcfile" ) ; if ( dir != null && dir . length ( ) > 0 ) { return new File ( dir ) ; } String baseDir = System . getProperty ( SqlLine . SQLLINE_BASE_DIR ) ; if ( baseDir != null && baseDir . length ( ) > 0 ) { File saveDir = new File ( baseDir ) . getAbsoluteFile ( ) ; saveDi...
public class SpiderAPI { /** * Starts a spider scan at the given { @ code url } and , optionally , with the perspective of the given { @ code user } . * @ param url the url to start the spider scan * @ param user the user to scan as , or null if the scan is done without the perspective of any user * @ param maxCh...
log . debug ( "API Spider scanning url: " + url ) ; boolean useUrl = true ; if ( url == null || url . isEmpty ( ) ) { if ( context == null || ! context . hasNodesInContextFromSiteTree ( ) ) { throw new ApiException ( Type . MISSING_PARAMETER , PARAM_URL ) ; } useUrl = false ; } else if ( context != null && ! context . ...
public class ArteVideoDetailsDeserializer { /** * liefert die erste Ausstrahlung des Typs ohne Berücksichtigung der CatchupRights */ private static String getBroadcastDateIgnoringCatchupRights ( JsonArray broadcastArray , String broadcastType ) { } }
String broadcastDate = "" ; for ( int i = 0 ; i < broadcastArray . size ( ) ; i ++ ) { JsonObject broadcastObject = broadcastArray . get ( i ) . getAsJsonObject ( ) ; if ( broadcastObject . has ( JSON_ELEMENT_BROADCASTTYPE ) && broadcastObject . has ( JSON_ELEMENT_BROADCAST ) ) { String type = broadcastObject . get ( J...
public class UserLoginModule { /** * Abort the login . * @ return true if abort was successful */ public final boolean abort ( ) { } }
boolean ret = false ; if ( UserLoginModule . LOG . isDebugEnabled ( ) ) { UserLoginModule . LOG . debug ( "Abort of " + this . principal ) ; } // If our authentication was successful , just return false if ( this . principal != null ) { // Clean up if overall authentication failed if ( this . committed ) { this . subje...
public class SecurityGroupUtils { /** * Provides a quick answer to whether a security group exists . * @ param ec2 * the EC2 client to use for making service requests * @ param securityGroupName * the name of the security group being queried * @ throws AmazonClientException * If any internal errors are enco...
DescribeSecurityGroupsRequest securityGroupsRequest = new DescribeSecurityGroupsRequest ( ) . withGroupNames ( securityGroupName ) ; try { ec2 . describeSecurityGroups ( securityGroupsRequest ) ; return true ; } catch ( AmazonServiceException ase ) { if ( INVALID_GROUP_NOT_FOUND . equals ( ase . getErrorCode ( ) ) ) { ...
public class XSLTAttributeDef { /** * Process an attribute string of type T _ QNAMES into a vector of QNames where * the specification requires that non - prefixed elements not be placed in a * namespace . ( See section 2.4 of XSLT 1.0 . ) * @ param handler non - null reference to current StylesheetHandler that i...
StringTokenizer tokenizer = new StringTokenizer ( value , " \t\n\r\f" ) ; int nQNames = tokenizer . countTokens ( ) ; Vector qnames = new Vector ( nQNames ) ; for ( int i = 0 ; i < nQNames ; i ++ ) { // Fix from Alexander Rudnev qnames . addElement ( new QName ( tokenizer . nextToken ( ) , handler ) ) ; } return qnames...
public class ServletHandler { /** * Get context attribute names . * Combines ServletHandler and HttpContext attributes . */ protected Enumeration getContextAttributeNames ( ) { } }
if ( _attributes . size ( ) == 0 ) return getHttpContext ( ) . getAttributeNames ( ) ; HashSet set = new HashSet ( _attributes . keySet ( ) ) ; Enumeration e = getHttpContext ( ) . getAttributeNames ( ) ; while ( e . hasMoreElements ( ) ) set . add ( e . nextElement ( ) ) ; return Collections . enumeration ( set ) ;
public class PluginConfigurationReaderImpl { /** * Read the catalogs from an { @ link URL } . * @ param pluginUrl The { @ link URL } . * @ return The { @ link JqassistantPlugin } . */ private JqassistantPlugin readPlugin ( URL pluginUrl ) { } }
try ( InputStream inputStream = new BufferedInputStream ( pluginUrl . openStream ( ) ) ) { return jaxbUnmarshaller . unmarshal ( inputStream ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Cannot read plugin from " + pluginUrl . toString ( ) , e ) ; }
public class RequestHelper { /** * Get the user agent from the given request . * @ param aHttpRequest * The HTTP request to get the UA from . * @ return < code > null < / code > if no user agent string is present */ @ Nullable public static String getHttpUserAgentStringFromRequest ( @ Nonnull final HttpServletReq...
// Use non - standard headers first String sUserAgent = aHttpRequest . getHeader ( CHttpHeader . UA ) ; if ( sUserAgent == null ) { sUserAgent = aHttpRequest . getHeader ( CHttpHeader . X_DEVICE_USER_AGENT ) ; if ( sUserAgent == null ) sUserAgent = aHttpRequest . getHeader ( CHttpHeader . USER_AGENT ) ; } return sUserA...
public class BeanProperty { /** * Sets the property value on the object . Attempts to first set the * property via its setter method such as " setFirstName ( ) " . If a setter * method doesn ' t exist , this will then attempt to set the property value * directly on the underlying field within the class . * < br...
// always try the " setMethod " first if ( setMethod != null ) { setMethod . invoke ( obj , value ) ; // fall back to setting the field directly } else if ( field != null ) { field . set ( obj , value ) ; } else { throw new IllegalAccessException ( "Cannot set property value" ) ; }
public class AbstractIntDoubleMap { /** * Assigns the result of a function to each value ; < tt > v [ i ] = function ( v [ i ] ) < / tt > . * @ param function a function object taking as argument the current association ' s value . */ public void assign ( final cern . colt . function . DoubleFunction function ) { } }
copy ( ) . forEachPair ( new cern . colt . function . IntDoubleProcedure ( ) { public boolean apply ( int key , double value ) { put ( key , function . apply ( value ) ) ; return true ; } } ) ;
public class AbstractDataDistributionType { /** * { @ inheritDoc } */ public void removeDataNode ( Node rootNode , String dataId ) throws RepositoryException { } }
Node parentNode = null ; try { Node node = getDataNode ( rootNode , dataId ) ; parentNode = node . getParent ( ) ; node . remove ( ) ; parentNode . save ( ) ; } catch ( InvalidItemStateException e ) { if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "An exception occurred: " + e . getMessage ( ) ) ; } if ( parentNode !=...