signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Matrix4x3d { /** * Set this matrix to a rotation matrix which rotates the given radians about a given axis . * When used with a right - handed coordinate system , the produced rotation will rotate a vector * counter - clockwise around the rotation axis , when viewing along the negative axis direction t...
double sin = Math . sin ( angle ) ; double cos = Math . cosFromSin ( sin , angle ) ; double C = 1.0 - cos ; double xy = x * y , xz = x * z , yz = y * z ; m00 = cos + x * x * C ; m01 = xy * C + z * sin ; m02 = xz * C - y * sin ; m10 = xy * C - z * sin ; m11 = cos + y * y * C ; m12 = yz * C + x * sin ; m20 = xz * C + y *...
public class FunctionalCheck { /** * Upgrade a given context to a functional or pure context . If the context * already was PURE , then it remains as PURE ( this is the highest level ) . * Otherwise , it is FUNCTIONAL . * @ param context * @ return */ public Context toFunctional ( Context context ) { } }
if ( context == Context . PURE ) { return context ; } else { return Context . FUNCTIONAL ; }
public class RtfList { /** * Create a default set of listlevels * @ since 2.1.3 */ protected void createDefaultLevels ( ) { } }
this . listLevels = new ArrayList ( ) ; // listlevels for ( int i = 0 ; i <= 8 ; i ++ ) { // create a list level RtfListLevel ll = new RtfListLevel ( this . document ) ; ll . setListType ( RtfListLevel . LIST_TYPE_NUMBERED ) ; ll . setFirstIndent ( 0 ) ; ll . setLeftIndent ( 0 ) ; ll . setLevelTextNumber ( i ) ; ll . s...
public class ListUtil { /** * Add the given element in the main list using a dichotomic algorithm . * < p > This function ensure that the comparator is invoked as : < code > comparator ( data , dataAlreadyInList ) < / code > . * @ param < E > is the type of the elements in the list . * @ param list is the list to...
assert list != null ; assert comparator != null ; assert data != null ; int first = 0 ; int last = list . size ( ) - 1 ; while ( last >= first ) { final int center = ( first + last ) / 2 ; final E dt = list . get ( center ) ; final int cmpR = comparator . compare ( data , dt ) ; if ( cmpR == 0 && ! allowMultipleOccuren...
public class Index { /** * Delete one synonym * @ param objectID The objectId of the synonym to delete * @ param requestOptions Options to pass to this request */ public JSONObject deleteSynonym ( String objectID , RequestOptions requestOptions ) throws AlgoliaException { } }
return deleteSynonym ( objectID , false , requestOptions ) ;
public class TacoTangoDeviceDAODefaultImpl { public DbDatum [ ] get_property ( TacoTangoDevice tacoDevice , String [ ] propnames ) throws DevFailed { } }
Except . throw_exception ( "Api_TacoFailed" , "Taco protocol not supported" , "TacoTangoDeviceDAODefaultImpl.command_inout()" ) ; return null ;
public class SystemProperties { /** * Gets a { @ code long } system property value . * @ param key the property key to retrieve . * @ param defaultValue the default value to return in case the property is not defined . * @ return the property value or the submitted default value if the property is not defined . *...
String value = System . getProperty ( key ) ; long longValue = defaultValue ; if ( value != null ) { try { longValue = Long . parseLong ( value ) ; } catch ( NumberFormatException e ) { LOG . warning ( e , "Ignoring invalid long system propert: ''{0}'' = ''{1}''" , key , value ) ; } } return longValue ;
public class ArrayDeserializer { /** * Reads the array . */ public Object readLengthList ( AbstractHessianInput in , int length ) throws IOException { } }
Object [ ] data = createArray ( length ) ; in . addRef ( data ) ; if ( _componentType != null ) { for ( int i = 0 ; i < data . length ; i ++ ) data [ i ] = in . readObject ( _componentType ) ; } else { for ( int i = 0 ; i < data . length ; i ++ ) data [ i ] = in . readObject ( ) ; } return data ;
public class StreamUtil { /** * Can be replaced with MoreCollectors . onlyElement as soon as we can upgrade to the newest Guava * version . * @ param < E > type of the element . * @ return only one element . * @ see < a href = " https : / / stackoverflow . com / questions / 22694884 / filter - java - stream - t...
return Collector . of ( AtomicReference < E > :: new , ( ref , e ) -> { if ( ! ref . compareAndSet ( null , e ) ) { throw new IllegalArgumentException ( "Multiple values" ) ; } } , ( ref1 , ref2 ) -> { if ( ref1 . get ( ) == null ) { return ref2 ; } else if ( ref2 . get ( ) != null ) { throw new IllegalArgumentExceptio...
public class JsonIOUtil { /** * Creates a json pipe from a byte array . */ public static Pipe newPipe ( byte [ ] data , int offset , int length , boolean numeric ) throws IOException { } }
final IOContext context = new IOContext ( DEFAULT_JSON_FACTORY . _getBufferRecycler ( ) , data , false ) ; final JsonParser parser = newJsonParser ( null , data , offset , offset + length , false , context ) ; return newPipe ( parser , numeric ) ;
public class VerticalScrollingBehavior { @ Override public void onNestedScroll ( @ NonNull CoordinatorLayout coordinatorLayout , @ NonNull V child , @ NonNull View target , int dxConsumed , int dyConsumed , int dxUnconsumed , int dyUnconsumed ) { } }
super . onNestedScroll ( coordinatorLayout , child , target , dxConsumed , dyConsumed , dxUnconsumed , dyUnconsumed ) ; if ( dyUnconsumed > 0 && mTotalDyUnconsumed < 0 ) { mTotalDyUnconsumed = 0 ; mScrollDirection = ScrollDirection . SCROLL_DIRECTION_UP ; onNestedVerticalScrollUnconsumed ( coordinatorLayout , child , m...
public class InApplicationMonitorJMXConnector { /** * This method is called for each reportable that is registered on the InApplicationMonitor . * Basically , it checks if the JMX implementation is interested in the reportable and adds * it to the " reportables " map which is the base for both getAttribute ( s ) an...
// use intern string representation - so we can synchronize on it final String reportableKey = reportable . getName ( ) . intern ( ) ; // noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized ( reportableKey ) { boolean beanAlreadyRegistred = reportables . containsKey ( reportableKey ) ; reportables...
public class Timers { /** * Defines a one - shot timer . * @ param milliseconds Time until the timeout callback fires * @ param callback Callback to fire * @ return The new timer object */ public static Timer setTimeout ( int milliseconds , TimerCallback callback ) { } }
TimeoutTimer timeout = new TimeoutTimer ( ) ; timeout . setId ( nativeSetTimeout ( milliseconds , callback , timeout ) ) ; return timeout ;
public class DFSActionImpl { /** * Extract the list of < T > from the structured selection * @ param clazz the class T * @ param selection the structured selection * @ return the list of < T > it contains */ private static < T > List < T > filterSelection ( Class < T > clazz , IStructuredSelection selection ) { }...
List < T > list = new ArrayList < T > ( ) ; for ( Object obj : selection . toList ( ) ) { if ( clazz . isAssignableFrom ( obj . getClass ( ) ) ) { list . add ( ( T ) obj ) ; } } return list ;
public class MutableTriple { /** * < p > Obtains an mutable triple of three objects inferring the generic types . < / p > * < p > This factory allows the triple to be created using inference to * obtain the generic types . < / p > * @ param < L > the left element type * @ param < M > the middle element type *...
return new MutableTriple < > ( left , middle , right ) ;
public class ServiceManagerSparql { /** * Deletes the given service * After successfully deleting a service , implementations of this method should raise a { @ code ServiceDeletedEvent } * @ param serviceUri the URI of the service to delete * @ return True if it was deleted or false otherwise * @ throws uk . ac...
if ( serviceUri == null || ! serviceUri . isAbsolute ( ) ) { log . warn ( "The Service URI is either absent or relative. Provide an absolute URI" ) ; return false ; } if ( ! this . graphStoreManager . canBeModified ( ) ) { log . warn ( "The dataset cannot be modified." ) ; return false ; } log . info ( "Deleting servic...
public class RecastMesh { /** * Returns true iff segments ab and cd intersect , properly or improperly . */ static boolean intersect ( int [ ] verts , int a , int b , int c , int d ) { } }
if ( intersectProp ( verts , a , b , c , d ) ) return true ; else if ( between ( verts , a , b , c ) || between ( verts , a , b , d ) || between ( verts , c , d , a ) || between ( verts , c , d , b ) ) return true ; else return false ;
public class Surface { /** * Rotates the current transformation matrix by the specified angle in radians . */ public Surface rotate ( float angle ) { } }
float sr = ( float ) Math . sin ( angle ) ; float cr = ( float ) Math . cos ( angle ) ; transform ( cr , sr , - sr , cr , 0 , 0 ) ; return this ;
public class SelectBase { /** * When set to < code > true < / code > , display icon ( s ) associated with * selected option ( s ) in the button . < br > * < br > * Defaults to < code > true < / code > . * @ param showIcon */ public void setShowIcon ( final boolean showIcon ) { } }
if ( ! showIcon ) attrMixin . setAttribute ( SHOW_ICON , Boolean . toString ( false ) ) ; else attrMixin . removeAttribute ( SHOW_ICON ) ;
public class AbstractFileClient { /** * Reads all assets under the specified location ( so it can read a sub set of the repo ) . * @ param relative * @ return * @ throws IOException * @ throws RequestFailureException */ protected List < Asset > readAssetsRelative ( final String relative ) throws IOException , R...
Collection < String > relativePaths = getChildren ( relative ) ; List < Asset > results = new ArrayList < Asset > ( ) ; for ( String s : relativePaths ) { if ( isJson ( s ) ) { try { Asset ass = getAsset ( getAssetIdFromJson ( s ) , false ) ; results . add ( ass ) ; } catch ( BadVersionException e ) { // Ignore assets ...
public class MessageManager { /** * Resolves the default resource bundle based on the locale information provided in the * supplied http request object . */ protected ResourceBundle resolveBundle ( HttpServletRequest req , String bundlePath , ClassLoader loader , boolean silent ) { } }
ResourceBundle bundle = null ; if ( req != null ) { Enumeration < ? > locales = req . getLocales ( ) ; while ( locales . hasMoreElements ( ) ) { Locale locale = ( Locale ) locales . nextElement ( ) ; try { // java caches resource bundles , so we don ' t need to reinvent the wheel here . // however , java also falls bac...
public class L1Cache { /** * Puts an entity into the L1 cache , if the cache exists for the current thread . * @ param entityTypeId name of the entity to put into the cache * @ param entity the entity to put into the cache */ public void put ( String entityTypeId , Entity entity ) { } }
CombinedEntityCache entityCache = caches . get ( ) ; if ( entityCache != null ) { entityCache . put ( entity ) ; LOG . trace ( "Added dehydrated row [{}] from entity {} to the L1 cache" , entity . getIdValue ( ) , entityTypeId ) ; }
public class JMTimeUtil { /** * Gets zone id . * @ param zoneId the zone id * @ return the zone id */ public static ZoneId getZoneId ( String zoneId ) { } }
return JMMap . getOrPutGetNew ( zoneIdCache , zoneId , ( ) -> ZoneId . of ( zoneId ) ) ;
public class DSetEditor { /** * Sets the logic for how this editor interacts with its underlying data . */ public void setAccessor ( Accessor < E > accessor ) { } }
removeAll ( ) ; _accessor = accessor ; _table = new ObjectEditorTable ( _entryClass , _editableFields , _accessor . getInterp ( _interp ) , _displayFields ) ; add ( new JScrollPane ( _table ) , BorderLayout . CENTER ) ;
public class JmsQueueImpl { /** * ( non - Javadoc ) * @ see com . ibm . websphere . sib . api . jms . JmsQueue # getProducerBind ( ) */ @ Override public String getProducerBind ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProducerBind" ) ; String producerBind = ( String ) properties . get ( PRODUCER_BIND ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getProducerBind" , pro...
public class MediaPanel { /** * Paints all the layers of the specified dirty region . */ protected void paintDirtyRect ( Graphics2D gfx , Rectangle rect ) { } }
// paint the behind the scenes stuff paintBehind ( gfx , rect ) ; // paint back sprites and animations paintBits ( gfx , AnimationManager . BACK , rect ) ; // paint the between the scenes stuff paintBetween ( gfx , rect ) ; // paint front sprites and animations paintBits ( gfx , AnimationManager . FRONT , rect ) ; // p...
public class AppSummaryService { /** * creates { @ link Put } for inserting additional info into agg tables * @ param { @ link AppAggregationKey } * @ param { @ link JobDetails } * @ return { @ link Put } * @ throws IOException */ boolean updateMoreAggInfo ( Table aggTable , AppAggregationKey appAggKey , JobDet...
int attempts = 0 ; boolean status = false ; // update number of runs while ( ( ! status ) && ( attempts < AggregationConstants . RETRY_COUNT ) ) { status = updateNumberRuns ( appAggKey , aggTable , jobDetails ) ; attempts ++ ; } // update queue attempts = 0 ; status = false ; while ( ( ! status ) && ( attempts < Aggreg...
public class MtasDataItem { /** * Compute comparable value . */ private void computeComparableValue ( ) { } }
recomputeComparableSortValue = false ; try { int type = getCompareValueType ( ) ; switch ( type ) { case 0 : comparableSortValue = getCompareValue0 ( ) ; break ; case 1 : comparableSortValue = getCompareValue1 ( ) ; break ; case 2 : comparableSortValue = getCompareValue2 ( ) ; break ; default : comparableSortValue = nu...
public class ConnectionManager { /** * Receive an expected number of bytes from the player , logging a warning if we get a different number of them . * @ param is the input stream associated with the player metadata socket . * @ param size the number of bytes we expect to receive . * @ param description the type ...
byte [ ] result = receiveBytes ( is ) ; if ( result . length != size ) { logger . warn ( "Expected " + size + " bytes while reading " + description + " response, received " + result . length ) ; } return result ;
public class DB { /** * Selects all terms associated with a post . * @ param postId The post id . * @ param taxonomy The taxonomy . If { @ code null } , any taxonomy is accepted . * @ return The list of terms . * @ throws SQLException on database error . */ public List < TaxonomyTerm > selectPostTerms ( final l...
Connection conn = null ; PreparedStatement stmt = null ; ResultSet rs = null ; List < Long > termIds = Lists . newArrayListWithExpectedSize ( 8 ) ; Timer . Context ctx = metrics . postTermsSelectTimer . time ( ) ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( selectPostTermsSQL ...
public class BridgeMockAgent { /** * Returns the integer value o the given belief */ public int getIntegerBelief ( String name ) { } }
Object belief = introspector . getBeliefBase ( this ) . get ( name ) ; int count = 0 ; if ( belief != null ) { count = ( Integer ) belief ; } return ( Integer ) count ;
public class RemoveTag { /** * removes the variable ( from a specific scope , if specified ) */ @ Override public int doEndTag ( ) throws JspException { } }
if ( ! scopeSpecified ) { pageContext . removeAttribute ( var ) ; } else { pageContext . removeAttribute ( var , scope ) ; } return EVAL_PAGE ;
public class EditUser { /** * 找到单个Channel , 用于编辑Channel信息界面加载信息 * @ param channelId * @ param context * @ throws WebxException */ public void execute ( @ Param ( "userId" ) Long userId , @ Param ( "pageIndex" ) int pageIndex , @ Param ( "searchKey" ) String searchKey , Context context , Navigator nav ) throws Exc...
User user = userService . findUserById ( userId ) ; context . put ( "user" , user ) ; context . put ( "pageIndex" , pageIndex ) ; context . put ( "searchKey" , searchKey ) ;
public class MethodCompiler { /** * Check whether object is of given type * < p > Stack : . . . , objectref = & gt ; . . . , objectref * @ param type * @ throws IOException */ public void checkcast ( TypeMirror type ) throws IOException { } }
switch ( type . getKind ( ) ) { case ARRAY : ArrayType array = ( ArrayType ) type ; int index = subClass . resolveClassIndex ( array ) ; checkcast ( index ) ; break ; case DECLARED : DeclaredType dt = ( DeclaredType ) type ; TypeElement te = ( TypeElement ) dt . asElement ( ) ; checkcast ( te ) ; break ; case TYPEVAR :...
public class MSExcelWriter { /** * Returns the CipherAlgorithm object matching the String . * @ param encryptAlgorithm encryption algorithm * @ return CipherAlgorithm object corresponding to encryption algorithm . Null if does not correspond to any algorithm . */ public static CipherAlgorithm getAlgorithmCipher ( S...
if ( encryptAlgorithm == null ) { return null ; } switch ( encryptAlgorithm ) { case "aes128" : return CipherAlgorithm . aes128 ; case "aes192" : return CipherAlgorithm . aes192 ; case "aes256" : return CipherAlgorithm . aes256 ; case "des" : return CipherAlgorithm . des ; case "des3" : return CipherAlgorithm . des3 ; ...
public class LexTokenReader { /** * Create a { @ link LexLocation } object from the current stream position . * @ param tokline * The token start line . * @ param tokpos * The token start position . * @ param endOffset * @ return A new LexLocation . */ private ILexLocation location ( int tokline , int tokpo...
// Fix for location on traces if ( this . location != null ) { return this . location ; } else { return new LexLocation ( file , currentModule , tokline , tokpos , linecount , charpos , startOffset , endOffset ) ; }
public class Rename { /** * Create the response for rename apoc with impacted constraints and indexes */ private Stream < BatchAndTotalResultWithInfo > getResultOfBatchAndTotalWithInfo ( Stream < BatchAndTotalResult > iterate , GraphDatabaseService db , String label , String rel , String prop ) { } }
List < String > constraints = new ArrayList < > ( ) ; List < String > indexes = new ArrayList < > ( ) ; if ( label != null ) { Iterable < ConstraintDefinition > constraintsForLabel = db . schema ( ) . getConstraints ( Label . label ( label ) ) ; constraintsForLabel . forEach ( ( c ) -> { constraints . add ( c . toStrin...
public class AWSS3V4Signer { /** * Determine whether to use aws - chunked for signing */ private boolean useChunkEncoding ( SignableRequest < ? > request ) { } }
// If chunked encoding is explicitly disabled through client options return right here . // Chunked encoding only makes sense to do when the payload is signed if ( ! isPayloadSigningEnabled ( request ) || isChunkedEncodingDisabled ( request ) ) { return false ; } if ( request . getOriginalRequestObject ( ) instanceof P...
public class RGraph { /** * Adds a new node to the RGraph . * @ param newNode The node to add to the graph */ public void addNode ( RNode newNode ) { } }
graph . add ( newNode ) ; graphBitSet . set ( graph . size ( ) - 1 ) ;
public class SymSpell { /** * / existing correctly spelled word . < / returns > */ public boolean createDictionaryEntry ( String key , long count , SuggestionStage staging ) { } }
if ( count <= 0 ) { if ( this . countThreshold > 0 ) { return false ; // no point doing anything if count is zero , as it can ' t change anything } count = 0 ; } long countPrevious ; // look first in below threshold words , update count , and allow promotion to correct spelling word if count reaches threshold // thresh...
public class ExportArgs { /** * Reads Couchbase store operation from the Hadoop configuration type . * @ param hadoopConfiguration Hadoop Configuration * @ return Couchbase store operation to be used * @ throws ArgsException in case of wrong arguments */ public static CouchbaseOperation getOperation ( Configurati...
String strCouchbaseOperation = hadoopConfiguration . get ( ARG_OPERATION . getPropertyName ( ) ) ; // Default value if ( strCouchbaseOperation == null ) { return CouchbaseOperation . SET ; } try { return CouchbaseOperation . valueOf ( strCouchbaseOperation ) ; } catch ( IllegalArgumentException e ) { throw new ArgsExce...
public class ObstacleAvoidanceQuery { /** * vector normalization that ignores the y - component . */ float [ ] dtRotate2D ( float [ ] v , float ang ) { } }
float [ ] dest = new float [ 3 ] ; float c = ( float ) Math . cos ( ang ) ; float s = ( float ) Math . sin ( ang ) ; dest [ 0 ] = v [ 0 ] * c - v [ 2 ] * s ; dest [ 2 ] = v [ 0 ] * s + v [ 2 ] * c ; dest [ 1 ] = v [ 1 ] ; return dest ;
import java . util . List ; import java . util . ArrayList ; public class DigitDivisibleNumbers { /** * This function will identify numbers within a specified range where the number is divisible by each of its digits . * Sample Usage : * findDigitDivisibleNumbers ( 1 , 22 ) - > [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ,...
List < Integer > resultList = new ArrayList < > ( ) ; for ( int num = start ; num <= end ; num ++ ) { String numAsString = Integer . toString ( num ) ; boolean isDivisible = true ; for ( char ch : numAsString . toCharArray ( ) ) { int digit = Character . getNumericValue ( ch ) ; if ( digit == 0 || num % digit != 0 ) { ...
public class ConverterManager { /** * Gets the best converter for the object specified . * @ param object the object to convert * @ return the converter to use * @ throws IllegalArgumentException if no suitable converter * @ throws IllegalStateException if multiple converters match the type * equally well */ ...
DurationConverter converter = ( DurationConverter ) iDurationConverters . select ( object == null ? null : object . getClass ( ) ) ; if ( converter != null ) { return converter ; } throw new IllegalArgumentException ( "No duration converter found for type: " + ( object == null ? "null" : object . getClass ( ) . getName...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcEnvironmentalImpactCategoryEnum createIfcEnvironmentalImpactCategoryEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcEnvironmentalImpactCategoryEnum result = IfcEnvironmentalImpactCategoryEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class SAXSource { /** * Attempt to obtain a SAX InputSource object from a Source * object . * @ param source Must be a non - null Source reference . * @ return An InputSource , or null if Source can not be converted . */ public static InputSource sourceToInputSource ( Source source ) { } }
if ( source instanceof SAXSource ) { return ( ( SAXSource ) source ) . getInputSource ( ) ; } else if ( source instanceof StreamSource ) { StreamSource ss = ( StreamSource ) source ; InputSource isource = new InputSource ( ss . getSystemId ( ) ) ; isource . setByteStream ( ss . getInputStream ( ) ) ; isource . setChara...
public class DateUtils { /** * Given a start date and end date ( which could be in verbatim forms ) construct an * event date representing the range from start of start date to end of end date . * If either startDate or endDate cannot be interpreted as a date , that bit will be * omitted from the result . If no d...
String result = null ; boolean startIsRange = false ; String separator = "" ; if ( ! DateUtils . isEmpty ( startDate ) ) { separator = "/" ; if ( DateUtils . eventDateValid ( startDate ) ) { result = startDate ; if ( DateUtils . isRange ( result ) ) { startIsRange = true ; } } else { EventResult startResult = DateUtils...
public class Objects { /** * / * validation */ public static void assertNotEmpty ( String message , Object o ) throws BadDataException { } }
assertTrue ( message , ! Objects . isNullOrEmpty ( o ) ) ;
public class HasInputStream { /** * Get a special implementation of { @ link IHasInputStream } for * { @ link NonBlockingByteArrayOutputStream } . * @ param aBAOS * Source stream . May not be < code > null < / code > . * @ return Never < code > null < / code > . * @ since . 2.1 */ @ Nonnull @ ReturnsMutableCo...
ValueEnforcer . notNull ( aBAOS , "BAOS" ) ; return new HISNBBAOS ( aBAOS ) ;
public class Computer { /** * Accepts the update to the node configuration . */ @ RequirePOST public void doConfigSubmit ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException , FormException { } }
checkPermission ( CONFIGURE ) ; String proposedName = Util . fixEmptyAndTrim ( req . getSubmittedForm ( ) . getString ( "name" ) ) ; Jenkins . checkGoodName ( proposedName ) ; Node node = getNode ( ) ; if ( node == null ) { throw new ServletException ( "No such node " + nodeName ) ; } if ( ( ! proposedName . equals ( n...
public class SenderSendsBundler { /** * current senders adding msgs to the bundler */ public void send ( Message msg ) throws Exception { } }
num_senders . incrementAndGet ( ) ; long size = msg . size ( ) ; lock . lock ( ) ; try { if ( count + size >= transport . getMaxBundleSize ( ) ) sendBundledMessages ( ) ; addMessage ( msg , size ) ; // at this point , we haven ' t sent our message yet ! if ( num_senders . decrementAndGet ( ) == 0 ) // no other sender t...
public class TrackerAddressHolder { /** * 是否可以尝试连接 * @ param retryAfterSecend 在n秒后重试 * @ return */ public boolean canTryToConnect ( int retryAfterSecend ) { } }
// 如果是有效连接 if ( this . available ) { return true ; // 如果连接无效 , 并且达到重试时间 } else if ( ( System . currentTimeMillis ( ) - lastUnavailableTime ) > retryAfterSecend * 1000 ) { return true ; } return false ;
public class AbcNode { /** * Returns the value parsed into short if label is DIGIT or DIGITS , else - 1. */ protected short getShortValue ( ) { } }
if ( label . equals ( AbcTokens . DIGIT ) || label . equals ( AbcTokens . DIGITS ) ) { try { return Short . parseShort ( value ) ; } catch ( NumberFormatException nfe ) { return - 1 ; } } else return - 1 ;
public class ParameterUtil { /** * Throw an { @ link IllegalArgumentException } when a number is not within the supplied range . * @ param name Name of the parameter to use in the Exception message . * @ param lower Lower bound ( inclusive ) . * @ param upper Upper bound ( inclusive ) . * @ param parameter The ...
if ( parameter < lower || parameter > upper ) { throw new IllegalArgumentException ( String . format ( "Invalid %s: %d (expected: %d <= n < %d)" , name , parameter , lower , upper + 1 ) ) ; }
public class SRTServletRequest { /** * replaced for Servlet 3.1 */ protected Part morphIntoPart ( DiskFileItem commonsFile ) { } }
if ( WCCustomProperties . CHECK_REQUEST_OBJECT_IN_USE ) { checkRequestObjectInUse ( ) ; } Part p = new SRTServletRequestPart ( commonsFile ) ; return p ;
public class QuartzScheduler { /** * Resume ( un - pause ) all of the * < code > { @ link com . helger . quartz . IJobDetail } s < / code > in the matching groups . * If any of the < code > Job < / code > s had < code > Trigger < / code > s that missed one * or more fire - times , then the < code > Trigger < / co...
validateState ( ) ; final ICommonsCollection < String > resumedGroups = m_aResources . getJobStore ( ) . resumeJobs ( _getOrDefault ( matcher ) ) ; notifySchedulerThread ( 0L ) ; for ( final String pausedGroup : resumedGroups ) { notifySchedulerListenersResumedJobs ( pausedGroup ) ; }
public class ServiceAndCheckMapColumnFixture { /** * Trigger to actually call check . * @ return raw check response */ public CheckResponse getRawCheckResponse ( ) { } }
if ( ! checkCalled ) { setupMaxTries ( ) ; setupWaitTime ( ) ; addResultsToValuesForCheck ( getCurrentRowValues ( ) ) ; long startTime = currentTimeMillis ( ) ; try { executeCheckWithRetry ( ) ; } finally { checkTime = currentTimeMillis ( ) - startTime ; } } return checkResponse ;
public class CreateDhcpOptionsRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < CreateDhcpOptionsRequest > getDryRunRequest ( ) { } }
Request < CreateDhcpOptionsRequest > request = new CreateDhcpOptionsRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class ConnectionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . MPCoreConnection # setMessageCopiedWhenSent ( boolean ) * Attribute on the MPCoreConnection . If set , a producer send will not copy * the message . */ @ Override public void setMessageCopiedWhenSent ( boolean copied ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setMessageCopiedWhenSent" , Boolean . valueOf ( copied ) ) ; _copyMessagesWhenSent = copied ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setMessageCopiedWhenSent" ) ;
public class ConcreteResourceRegistration { /** * Metrics and runtime attributes are always registered in the MMR only for normal server . * If they are flagged with { @ link AttributeAccess . Flag # STORAGE _ RUNTIME } and * { @ link AttributeAccess . Flag # RUNTIME _ SERVICE _ NOT _ REQUIRED } , they are register...
boolean runtime = definition . getImmutableFlags ( ) . contains ( AttributeAccess . Flag . STORAGE_RUNTIME ) ; if ( ! runtime ) { return true ; } boolean runtimeServiceNotRequired = definition . getImmutableFlags ( ) . contains ( AttributeAccess . Flag . RUNTIME_SERVICE_NOT_REQUIRED ) ; if ( runtimeServiceNotRequired )...
public class MathUtils { /** * Multiplies the array of numbers . * @ param numbers the array of integer values to multiply . * @ return the array of integer numbers multiplied together . */ @ NullSafe public static int multiply ( final int ... numbers ) { } }
int result = 0 ; if ( numbers != null ) { result = ( numbers . length > 0 ? 1 : 0 ) ; for ( int number : numbers ) { result *= number ; } } return result ;
public class AutoRefillStack { /** * Grab a single ID from the stack . If the stack is empty , load up a new batch from the wrapped generator . * @ return A single ID . */ byte [ ] popOne ( ) throws GeneratorException { } }
try { return idStack . pop ( ) ; } catch ( NoSuchElementException e ) { // Cached stack is empty , load up a fresh stack . idStack . addAll ( generator . batch ( batchSize ) ) ; return popOne ( ) ; }
public class ObjectMapperHelpers { /** * Transforms a JSON string to an List < Object > using org . codehaus . jackson . map . ObjectMapper * If you want to parse a single Object please @ see { # link JsonToObject } * @ param json string representing a collection of objects * @ param type Class of the contained o...
return JACKSON2_MAPPER . readValue ( json , JACKSON2_MAPPER . getTypeFactory ( ) . constructCollectionType ( List . class , type ) ) ;
public class SpScheduler { /** * Check if the MP task has to be queued because the first fragment is still being logged * synchronously to the command log . If not , offer it to the transaction task queue . * @ param task A fragment task or a complete transaction task */ private void queueOrOfferMPTask ( Transactio...
// The pending map will only have an entry for the transaction if the first fragment is // still pending durability . Queue < TransactionTask > pendingTasks = m_mpsPendingDurability . get ( task . getTxnId ( ) ) ; if ( pendingTasks != null ) { pendingTasks . offer ( task ) ; } else { m_pendingTasks . offer ( task ) ; }
public class Suggester { /** * 将分数map排序折叠 * @ param scoreMap * @ return */ private static TreeMap < Double , Set < String > > sortScoreMap ( TreeMap < String , Double > scoreMap ) { } }
TreeMap < Double , Set < String > > result = new TreeMap < Double , Set < String > > ( Collections . reverseOrder ( ) ) ; for ( Map . Entry < String , Double > entry : scoreMap . entrySet ( ) ) { Set < String > sentenceSet = result . get ( entry . getValue ( ) ) ; if ( sentenceSet == null ) { sentenceSet = new HashSet ...
public class CmpUtil { /** * Retrieves a canonical comparator for the given type , which has to be a { @ link List } of { @ link Comparable } types . * @ return the canonical comparator * @ see # canonicalCompare ( List , List ) */ public static < T extends List < U > , U extends Comparable < U > > Comparator < T >...
return CmpUtil :: canonicalCompare ;
public class AppServiceEnvironmentsInner { /** * Create or update a multi - role pool . * Create or update a multi - role pool . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service Environment . * @ param multiRolePoolEnvelope Properties ...
return ServiceFuture . fromResponse ( createOrUpdateMultiRolePoolWithServiceResponseAsync ( resourceGroupName , name , multiRolePoolEnvelope ) , serviceCallback ) ;
public class ControllersInner { /** * Lists the Azure Dev Spaces Controllers in a resource group . * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and subscription . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ thr...
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ControllerInner > > , Page < ControllerInner > > ( ) { @ Override public Page < ControllerInner > call ( ServiceResponse < Page < ControllerInner > > response ) { return response . body ( ) ; } } ) ;
public class NetworkUtil { /** * Get all local addresses on which a multicast can be send * @ return list of all multi cast capable addresses */ public static List < InetAddress > getMulticastAddresses ( ) throws SocketException { } }
Enumeration < NetworkInterface > nifs = NetworkInterface . getNetworkInterfaces ( ) ; List < InetAddress > ret = new ArrayList < InetAddress > ( ) ; while ( nifs . hasMoreElements ( ) ) { NetworkInterface nif = nifs . nextElement ( ) ; if ( checkMethod ( nif , supportsMulticast ) && checkMethod ( nif , isUp ) ) { Enume...
public class AnnotatedTypes { /** * Compares two annotated types and returns true if they are the same */ public static boolean compareAnnotatedTypes ( AnnotatedType < ? > t1 , AnnotatedType < ? > t2 ) { } }
if ( ! t1 . getJavaClass ( ) . equals ( t2 . getJavaClass ( ) ) ) { return false ; } if ( ! compareAnnotated ( t1 , t2 ) ) { return false ; } if ( t1 . getFields ( ) . size ( ) != t2 . getFields ( ) . size ( ) ) { return false ; } Map < Field , AnnotatedField < ? > > fields = new HashMap < Field , AnnotatedField < ? > ...
public class AndRule { /** * Create rule from top two elements of stack . * @ param stack stack of rules . * @ return Rule that evaluates true only if both rules are true . */ public static Rule getRule ( final Stack stack ) { } }
if ( stack . size ( ) < 2 ) { throw new IllegalArgumentException ( "Invalid AND rule - expected two rules but received " + stack . size ( ) ) ; } Object o2 = stack . pop ( ) ; Object o1 = stack . pop ( ) ; if ( ( o2 instanceof Rule ) && ( o1 instanceof Rule ) ) { Rule p2 = ( Rule ) o2 ; Rule p1 = ( Rule ) o1 ; return n...
public class AWSParameterStoreConfigClient { /** * Execution service to make call to AWS . * @ param executionService ExectorService */ @ Inject void setExecutionService ( @ Named ( TaskExecutors . IO ) @ Nullable ExecutorService executionService ) { } }
if ( executionService != null ) { this . executionService = executionService ; }
public class LaxURLCodec { /** * Decodes an array of URL safe 7 - bit characters into an array of * original bytes . Escaped characters are converted back to their * original representation . * Differs from URLCodec . decodeUrl ( ) in that it throws no * exceptions ; bad or incomplete escape sequences are ignor...
if ( bytes == null ) { return null ; } ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; for ( int i = 0 ; i < bytes . length ; i ++ ) { int b = bytes [ i ] ; if ( b == '+' ) { buffer . write ( ' ' ) ; continue ; } if ( b == '%' ) { if ( i + 2 < bytes . length ) { int u = Character . digit ( ( char ) bytes...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MencloseType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "menclose" ) public JAXBElement < MencloseType > createMenclose ( MencloseType value ) { } }
return new JAXBElement < MencloseType > ( _Menclose_QNAME , MencloseType . class , null , value ) ;
public class WhileyFileParser { /** * Parse an import declaration , which is of the form : * < pre > * ImportDecl : : = Identifier [ " from " ( ' * ' | Identifier ) ] ( ' : : ' ( ' * ' | Identifier ) ) * * < / pre > */ private Decl parseImportDeclaration ( ) { } }
int start = index ; EnclosingScope scope = new EnclosingScope ( ) ; match ( Import ) ; Identifier fromName = parseOptionalFrom ( scope ) ; Tuple < Identifier > filterPath = parseFilterPath ( scope ) ; int end = index ; matchEndLine ( ) ; Decl . Import imprt ; if ( fromName != null ) { imprt = new Decl . Import ( filter...
public class Validate { /** * Checks if the given long is NOT positive . * @ param value The long value to validate . * @ throws ParameterException if the given long value is < code > null < / code > or bigger than 0. */ public static void notPositive ( Long value ) { } }
if ( ! validation ) return ; notNull ( value ) ; if ( value > 0 ) throw new ParameterException ( ErrorCode . POSITIVE ) ;
public class MapKeyLoader { /** * Triggers key loading on the map key loader with the { @ link Role # SENDER } * role . * @ param mapStoreContext the map store context for this map * @ param partitionId the partition ID of this map key loader * @ return a future representing pending completion of the key loadin...
this . partitionId = partitionId ; this . mapNamePartition = partitionService . getPartitionId ( toData . apply ( mapName ) ) ; Role newRole = calculateRole ( ) ; role . nextOrStay ( newRole ) ; state . next ( State . LOADING ) ; if ( logger . isFinestEnabled ( ) ) { logger . finest ( "startInitialLoad invoked " + getS...
public class VelocityParser { /** * Get any valid Velocity block starting with a sharp character ( # if , # somemaccro ( ) , # # comment etc . ) . * @ param array the source to parse * @ param currentIndex the current index in the < code > array < / code > * @ param velocityBlock the buffer where to append matche...
int i = currentIndex ; if ( i + 1 >= array . length ) { throw new InvalidVelocityException ( ) ; } if ( array [ i + 1 ] == '#' ) { // A simple line comment i = getSimpleComment ( array , currentIndex , velocityBlock , context ) ; } else if ( array [ i + 1 ] == '*' ) { // A multi lines comment i = getMultilinesComment (...
public class ResourceHealthMetadatasInner { /** * List all ResourceHealthMetadata for all sites in the subscription . * List all ResourceHealthMetadata for all sites in the subscription . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ;...
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < ResourceHealthMetadataInner > > , Page < ResourceHealthMetadataInner > > ( ) { @ Override public Page < ResourceHealthMetadataInner > call ( ServiceResponse < Page < ResourceHealthMetadataInner > > response ) { return response . body (...
public class InternalXtextParser { /** * InternalXtext . g : 1120:1 : entryRuleTerminalAlternatives : ruleTerminalAlternatives EOF ; */ public final void entryRuleTerminalAlternatives ( ) throws RecognitionException { } }
try { // InternalXtext . g : 1121:1 : ( ruleTerminalAlternatives EOF ) // InternalXtext . g : 1122:1 : ruleTerminalAlternatives EOF { before ( grammarAccess . getTerminalAlternativesRule ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_1 ) ; ruleTerminalAlternatives ( ) ; state . _fsp -- ; after ( grammarAccess . getTermina...
public class TmdbLists { /** * Get a list by its ID * @ param listId * @ return The list and its items * @ throws MovieDbException */ public ListItem < MovieInfo > getList ( String listId ) throws MovieDbException { } }
TmdbParameters parameters = new TmdbParameters ( ) ; parameters . add ( Param . ID , listId ) ; URL url = new ApiUrl ( apiKey , MethodBase . LIST ) . buildUrl ( parameters ) ; String webpage = httpTools . getRequest ( url ) ; try { return MAPPER . readValue ( webpage , new TypeReference < ListItem < MovieInfo > > ( ) {...
public class IanaEncodings { /** * Gets the java encoding from the IANA encoding . If the encoding cannot be found * it returns the input . * @ param iana the IANA encoding * @ return the java encoding */ public static String getJavaEncoding ( String iana ) { } }
String IANA = iana . toUpperCase ( ) ; String jdec = ( String ) map . get ( IANA ) ; if ( jdec == null ) jdec = iana ; return jdec ;
public class DefaultVOMSProxyInfoBehaviour { /** * Extracts the list of KeyUsage from the proxy */ private void resolveProxyKeyUsage ( ) { } }
boolean [ ] keyUsages = proxyCredential . getCertificate ( ) . getKeyUsage ( ) ; if ( keyUsages != null ) { int index = 0 ; for ( boolean key : keyUsages ) { if ( key ) proxyKeyUsageList . add ( keyUsagesValues [ index ] ) ; index ++ ; } }
public class VersionCommandTask { /** * { @ inheritDoc } */ @ Override public Set < String > getSupportedOptions ( ) { } }
return new HashSet < String > ( Arrays . asList ( IFIXES_OPTION , VERBOSE_OPTION ) ) ;
public class RenderingUtils { /** * Private Helper Code * * * * * */ private static Method getMethodDrawString ( ) { } }
try { Class < ? > clazz = Class . forName ( SWING_UTILITIES2_NAME ) ; return clazz . getMethod ( "drawString" , new Class [ ] { JComponent . class , Graphics . class , String . class , Integer . TYPE , Integer . TYPE } ) ; } catch ( ClassNotFoundException e ) { // returns null } catch ( SecurityException e ) { // retur...
public class GetVaultNotificationsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetVaultNotificationsRequest getVaultNotificationsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getVaultNotificationsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getVaultNotificationsRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( getVaultNotificationsRequest . getVaultName ( ) , VA...
public class FeatureInfoWidget { /** * Set the feature to display . * @ param feature The feature . */ @ Override public void setFeature ( Feature feature ) { } }
for ( HasFeature action : actions ) { action . setFeature ( feature ) ; } presenter . setFeature ( feature ) ;
public class RuleIndexer { /** * Commit a change on a rule and its extension on the given organization */ public void commitAndIndex ( DbSession dbSession , int ruleId , OrganizationDto organization ) { } }
List < EsQueueDto > items = asList ( createQueueDtoForRule ( ruleId ) , createQueueDtoForRuleExtension ( ruleId , organization ) ) ; dbClient . esQueueDao ( ) . insert ( dbSession , items ) ; dbSession . commit ( ) ; postCommit ( dbSession , items ) ;
public class EncodeCloneID { /** * If unsuccessful returns the original as string */ public static String encodeLong ( long val ) { } }
String str = null ; try { str = Long . toString ( val , radix ) ; return str ; } catch ( Throwable th ) { com . ibm . ws . ffdc . FFDCFilter . processException ( th , "com.ibm.ws.session.utils.EncodeCloneID.encodeLong" , "39" , "" + val ) ; } return Long . toString ( val ) ;
public class OrmElf { /** * This method will iterate over a ResultSet that contains columns that map to the * target class and return a list of target instances . < b > Note , this assumes that * ResultSet . next ( ) has < i > NOT < / i > been called before calling this method . < / b > * < b > The entire ResultS...
return OrmReader . resultSetToList ( resultSet , targetClass ) ;
public class InternalHelper { /** * Inherit the BatchClientBehavior classes from parent object * @ param inheritingObject the inherit object * @ param baseBehaviors base class behavior list */ public static void inheritClientBehaviorsAndSetPublicProperty ( IInheritedBehaviors inheritingObject , Iterable < BatchClie...
// implement inheritance of behaviors List < BatchClientBehavior > customBehaviors = new ArrayList < > ( ) ; // if there were any behaviors , pre - populate the collection ( ie : inherit ) if ( null != baseBehaviors ) { for ( BatchClientBehavior be : baseBehaviors ) { customBehaviors . add ( be ) ; } } // set the publi...
public class GCHSTImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . GCHST__XPOS : return getXPOS ( ) ; case AfplibPackage . GCHST__YPOS : return getYPOS ( ) ; case AfplibPackage . GCHST__CP : return getCP ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class ContentResourceImpl { /** * This method copies the content found in space srcSpaceID with id * srcContentID to the space destSpaceID within the same content store * ( storeID ) to the id of destContentID . * @ param srcStoreID of content to copy * @ param srcSpaceID of content to copy * @ param s...
BrokeredStorageProvider srcProvider = getStorageProvider ( srcStoreID ) ; BrokeredStorageProvider destProvider = getStorageProvider ( destStoreID ) ; if ( srcProvider . equals ( destProvider ) ) { return copyContent ( srcProvider , srcSpaceID , srcContentID , destSpaceID , destContentID , srcStoreID ) ; } else { return...
public class JCudaDriver { /** * Sets the block - dimensions for the function . * < pre > * CUresult cuFuncSetBlockShape ( * CUfunction hfunc , * int x , * int y , * int z ) * < / pre > * < div > * < p > Sets the block - dimensions for the * function . * Deprecated Specifies the < tt > x < / tt > ...
return checkResult ( cuFuncSetBlockShapeNative ( hfunc , x , y , z ) ) ;
public class AppEngineResourceManager { /** * Applies the specified entity ' s update to the Google App Engine Datastore . * @ param entity An entity instance to be updated to . */ @ Override public void update ( Object entity ) { } }
if ( entity == null ) { throw new IllegalArgumentException ( "'entity' must not be [" + entity + "]" ) ; } if ( operation != Log . Operation . GET ) { throw new IllegalStateException ( "Log [" + operation + "] -> [" + Log . Operation . UPDATE + "] is not allowed: previous operation must be [" + Log . Operation . GET + ...
public class ContentSpec { /** * Set the Checksum value for a Content Specification . * Note : This value isn ' t used by the toString ( ) function as it re calculates the Checksum . * @ param checksum The Checksum of the Content Specification . */ public void setChecksum ( final String checksum ) { } }
if ( checksum == null && this . checksum == null ) { return ; } else if ( checksum == null ) { removeChild ( this . checksum ) ; this . checksum = null ; } else if ( this . checksum == null ) { this . checksum = new KeyValueNode < String > ( CommonConstants . CS_CHECKSUM_TITLE , checksum ) ; appendChild ( this . checks...
public class CmsSiteManager { /** * Closes the current dialog window and updates the sites table if requested . < p > * @ param updateTable < code > true < / code > to update the sites table */ public void closeDialogWindow ( boolean updateTable ) { } }
if ( m_dialogWindow != null ) { m_dialogWindow . close ( ) ; m_dialogWindow = null ; } if ( updateTable ) { A_CmsUI . get ( ) . reload ( ) ; }
public class ChatChannelManager { /** * Delivers the supplied chat channel message to the specified bodies . */ protected void deliverSpeak ( ChatChannel channel , UserMessage message , int [ ] bodyIds ) { } }
channel = intern ( channel ) ; for ( int bodyId : bodyIds ) { BodyObject bobj = getBodyObject ( bodyId ) ; if ( bobj != null && shouldDeliverSpeak ( channel , message , bobj ) ) { _chatHistory . record ( channel , bobj . getChatIdentifier ( message ) , message , bobj . getVisibleName ( ) ) ; bobj . postMessage ( ChatCo...
public class ImmutableUnificationTools { /** * TODO : explain */ private Optional < ImmutableSubstitution < ImmutableTerm > > computeDirectedMGUOfTwoFunctionalTerms ( ImmutableFunctionalTerm sourceTerm , ImmutableFunctionalTerm targetTerm ) { } }
/* * Function symbol equality */ if ( ! sourceTerm . getFunctionSymbol ( ) . equals ( targetTerm . getFunctionSymbol ( ) ) ) { return Optional . empty ( ) ; } ImmutableList < ? extends ImmutableTerm > sourceChildren = sourceTerm . getTerms ( ) ; ImmutableList < ? extends ImmutableTerm > targetChildren = targetTerm . ge...
public class MockHttpServletResponse { /** * The default implementation returns the given URL String as - is . Use * { @ link # setEncodeUrlSuffix ( String ) } to define a suffix to be appended . * @ return the encoded URL */ @ Nullable public String encodeURL ( @ Nullable final String sUrl ) { } }
if ( StringHelper . hasText ( m_sEncodeUrlSuffix ) ) return StringHelper . getNotNull ( sUrl ) + m_sEncodeUrlSuffix ; return sUrl ;