signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GeoPackageCoreConnection { /** * Query for typed values in a single ( first ) row * @ param < T > * result value type * @ param sql * sql statement * @ param args * arguments * @ return single row results * @ since 3.1.0 */ public < T > List < T > querySingleRowTypedResults ( String sql , S...
@ SuppressWarnings ( "unchecked" ) List < T > result = ( List < T > ) querySingleRowResults ( sql , args ) ; return result ;
public class JavacState { /** * Recursively delete a directory and all its contents . */ private void deleteContents ( File dir ) { } }
if ( dir != null && dir . exists ( ) ) { for ( File f : dir . listFiles ( ) ) { if ( f . isDirectory ( ) ) { deleteContents ( f ) ; } if ( ! options . isUnidentifiedArtifactPermitted ( f . getAbsolutePath ( ) ) ) { Log . debug ( "Removing " + f . getAbsolutePath ( ) ) ; f . delete ( ) ; } } }
public class AbstractPostgreSQLQuery { /** * adds a DISTINCT ON clause * @ param exprs * @ return */ @ WithBridgeMethods ( value = PostgreSQLQuery . class , castRequired = true ) public C distinctOn ( Expression < ? > ... exprs ) { } }
return addFlag ( Position . AFTER_SELECT , Expressions . template ( Object . class , "distinct on({0}) " , ExpressionUtils . list ( Object . class , exprs ) ) ) ;
public class JwtTokenActions { /** * anyone calling this method needs to add upn to the extraClaims that it passes in ( if they need it ) */ public String getJwtTokenUsingBuilder ( String testName , LibertyServer server , String builderId , List < NameValuePair > extraClaims ) throws Exception { } }
String jwtBuilderUrl = SecurityFatHttpUtils . getServerUrlBase ( server ) + "/jwtbuilder/build" ; List < NameValuePair > requestParams = setRequestParms ( builderId , extraClaims ) ; WebClient webClient = new WebClient ( ) ; Page response = invokeUrlWithParameters ( testName , webClient , jwtBuilderUrl , requestParams ...
public class JournalCreator { /** * Create a journal entry , add the arguments , and invoke the method . */ public Date setDatastreamVersionable ( Context context , String pid , String dsID , boolean versionable , String logMessage ) throws ServerException { } }
try { CreatorJournalEntry cje = new CreatorJournalEntry ( METHOD_SET_DATASTREAM_VERSIONABLE , context ) ; cje . addArgument ( ARGUMENT_NAME_PID , pid ) ; cje . addArgument ( ARGUMENT_NAME_DS_ID , dsID ) ; cje . addArgument ( ARGUMENT_NAME_VERSIONABLE , versionable ) ; cje . addArgument ( ARGUMENT_NAME_LOG_MESSAGE , log...
public class ReflectionUtil { /** * Create a ORCSchemaProvider from it ' s fully qualified class name . The * class passed in by name must be assignable to ORCSchemaProvider and have * 1 - parameter constructor accepting a SecorConfig . Allows the ORCSchemaProvider * to be pluggable by providing the class name of...
Class < ? > clazz = Class . forName ( className ) ; if ( ! ORCSchemaProvider . class . isAssignableFrom ( clazz ) ) { throw new IllegalArgumentException ( String . format ( "The class '%s' is not assignable to '%s'." , className , ORCSchemaProvider . class . getName ( ) ) ) ; } return ( ORCSchemaProvider ) clazz . getC...
public class OAuth20UsernamePasswordAuthenticator { /** * Gets client id and client secret . * @ param context the context * @ return the client id and client secret */ protected Pair < String , String > getClientIdAndClientSecret ( final WebContext context ) { } }
val extractor = new BasicAuthExtractor ( ) ; val upc = extractor . extract ( context ) ; if ( upc != null ) { return Pair . of ( upc . getUsername ( ) , upc . getPassword ( ) ) ; } val clientId = context . getRequestParameter ( OAuth20Constants . CLIENT_ID ) ; val clientSecret = context . getRequestParameter ( OAuth20C...
public class DefaultGroovyStaticMethods { /** * Works exactly like ResourceBundle . getBundle ( String , Locale ) . This is needed * because the java method depends on a particular stack configuration that * is not guaranteed in Groovy when calling the Java method . * @ param self placeholder variable used by Gro...
Class c = ReflectionUtils . getCallingClass ( ) ; ClassLoader targetCL = c != null ? c . getClassLoader ( ) : null ; if ( targetCL == null ) targetCL = ClassLoader . getSystemClassLoader ( ) ; return ResourceBundle . getBundle ( bundleName , locale , targetCL ) ;
public class h2odriver { /** * Array of bytes to brute - force convert into a hexadecimal string . * The length of the returned string is byteArr . length * 2. * @ param byteArr byte array to convert * @ return hexadecimal string */ static private String convertByteArrToString ( byte [ ] byteArr ) { } }
StringBuilder sb = new StringBuilder ( ) ; for ( byte b : byteArr ) { int i = b ; i = i & 0xff ; sb . append ( String . format ( "%02x" , i ) ) ; } return sb . toString ( ) ;
public class TokenizerBagOfWordsTermSequenceIndexTransform { /** * Convert the given text * in to an { @ link INDArray } * using the { @ link TokenizerFactory } * specified in the constructor . * @ param text the text to transform * @ return the created { @ link INDArray } * based on the { @ link # wordInde...
Tokenizer tokenizer = tokenizerFactory . create ( text ) ; List < String > tokens = tokenizer . getTokens ( ) ; INDArray create = Nd4j . create ( 1 , wordIndexMap . size ( ) ) ; Counter < String > tokenizedCounter = new Counter < > ( ) ; for ( int i = 0 ; i < tokens . size ( ) ; i ++ ) { tokenizedCounter . incrementCou...
public class BoxAPIConnection { /** * Refresh ' s this connection ' s access token using its refresh token . * @ throws IllegalStateException if this connection ' s access token cannot be refreshed . */ public void refresh ( ) { } }
this . refreshLock . writeLock ( ) . lock ( ) ; if ( ! this . canRefresh ( ) ) { this . refreshLock . writeLock ( ) . unlock ( ) ; throw new IllegalStateException ( "The BoxAPIConnection cannot be refreshed because it doesn't have a " + "refresh token." ) ; } URL url = null ; try { url = new URL ( this . tokenURL ) ; }...
public class AbstractAtomFeedParser { /** * Parse the feed and return a new parsed instance of the feed type . This method can be skipped if * all you want are the items . * @ throws IOException I / O exception * @ throws XmlPullParserException XML pull parser exception */ public T parseFeed ( ) throws IOExceptio...
boolean close = true ; try { this . feedParsed = true ; T result = Types . newInstance ( feedClass ) ; Xml . parseElement ( parser , result , namespaceDictionary , Atom . StopAtAtomEntry . INSTANCE ) ; close = false ; return result ; } finally { if ( close ) { close ( ) ; } }
public class GramAttributes { /** * Returns type of the job . * @ return job type . - 1 if not set or job type * is unknown . */ public int getJobType ( ) { } }
String jobType = getSingle ( "jobtype" ) ; if ( jobType == null ) return - 1 ; if ( jobType . equalsIgnoreCase ( "single" ) ) { return JOBTYPE_SINGLE ; } else if ( jobType . equalsIgnoreCase ( "multiple" ) ) { return JOBTYPE_MULTIPLE ; } else if ( jobType . equalsIgnoreCase ( "mpi" ) ) { return JOBTYPE_MPI ; } else if ...
public class RegistryCredentialMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RegistryCredential registryCredential , ProtocolMarshaller protocolMarshaller ) { } }
if ( registryCredential == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( registryCredential . getCredential ( ) , CREDENTIAL_BINDING ) ; protocolMarshaller . marshall ( registryCredential . getCredentialProvider ( ) , CREDENTIALPROVIDER_BI...
public class Primitives { /** * Returns the boxed default value for a primitive or a primitive wrapper . * @ param primitiveOrWrapperType The type to lookup the default value * @ return The boxed default values as defined in Java Language Specification , * < code > null < / code > if the type is neither a primiti...
return ( T ) PRIMITIVE_OR_WRAPPER_DEFAULT_VALUES . get ( primitiveOrWrapperType ) ;
public class BsCrawlingInfoParamCB { public CrawlingInfoParamCB acceptPK ( String id ) { } }
assertObjectNotNull ( "id" , id ) ; BsCrawlingInfoParamCB cb = this ; cb . query ( ) . docMeta ( ) . setId_Equal ( id ) ; return ( CrawlingInfoParamCB ) this ;
public class SqlSubstitutionFragment { /** * Return the text for a PreparedStatement from this fragment . This type of fragment * typically evaluates any reflection parameters at this point . The exception * is if the reflected result is a ComplexSqlFragment , it that case the sql text * is retrieved from the fra...
StringBuilder sb = new StringBuilder ( ) ; for ( SqlFragment frag : _children ) { boolean complexFragment = frag . hasComplexValue ( context , m , args ) ; if ( frag . hasParamValue ( ) && ! complexFragment ) { Object [ ] pValues = frag . getParameterValues ( context , m , args ) ; for ( Object o : pValues ) { sb . app...
public class ServerManager { /** * Starts a Tango server . The system property TANGO _ HOST is mandatory if * using the tango database . If the tango db is not used the system property * OAPort ( for jacorb ) must be set . The errors occurred will be only logged . * < pre > * ServerManager . getInstance ( ) . s...
if ( ! isStarted . get ( ) ) { addClass ( deviceClass . getSimpleName ( ) , deviceClass ) ; try { init ( args , deviceClass . getSimpleName ( ) ) ; } catch ( final DevFailed e ) { DevFailedUtils . printDevFailed ( e ) ; } }
public class InternalXbaseWithAnnotationsParser { /** * InternalXbaseWithAnnotations . g : 6823:1 : ruleQualifiedNameInStaticImport returns [ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ] : ( this _ ValidID _ 0 = ruleValidID kw = ' . ' ) + ; */ public final AntlrDatatypeRuleToken ruleQualifiedNameIn...
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ; Token kw = null ; AntlrDatatypeRuleToken this_ValidID_0 = null ; enterRule ( ) ; try { // InternalXbaseWithAnnotations . g : 6829:2 : ( ( this _ ValidID _ 0 = ruleValidID kw = ' . ' ) + ) // InternalXbaseWithAnnotations . g : 6830:2 : ( this _ ValidID _ ...
public class SvgPathData { /** * Checks an ' l ' command . */ private void checkl ( ) throws DatatypeException , IOException { } }
if ( context . length ( ) == 0 ) { appendToContext ( current ) ; } current = reader . read ( ) ; appendToContext ( current ) ; skipSpaces ( ) ; _checkl ( 'l' , true ) ;
public class RTMPUtils { /** * Calculates the delta between two time stamps , adjusting for time stamp wrapping . * @ param a * First time stamp * @ param b * Second time stamp * @ return the distance between a and b , which will be negative if a is less than b . */ public static long diffTimestamps ( final i...
// first convert each to unsigned integers final long unsignedA = a & 0xFFFFFFFFL ; final long unsignedB = b & 0xFFFFFFFFL ; // then find the delta final long delta = unsignedA - unsignedB ; return delta ;
public class FastHessianFeatureDetector { /** * Sees if the best score in the current layer is greater than all the scores in a 3x3 neighborhood * in another layer . */ protected static boolean checkMax ( ImageBorder_F32 inten , float bestScore , int c_x , int c_y ) { } }
for ( int y = c_y - 1 ; y <= c_y + 1 ; y ++ ) { for ( int x = c_x - 1 ; x <= c_x + 1 ; x ++ ) { if ( inten . get ( x , y ) >= bestScore ) { return false ; } } } return true ;
public class InBinding { /** * Appends the value to the matching value list . * @ param value * the matching value to be appended . */ public void addValue ( final Object value ) { } }
if ( value == null ) { setNullContained ( true ) ; } else { _values . add ( String . valueOf ( value ) ) ; }
public class ClassInfoCache { /** * ' [ b ] oolean ' and ' [ b ] yte ' . */ public static Class < ? > getPrimitiveClass ( Type type ) { } }
switch ( type . getDescriptor ( ) . charAt ( 0 ) ) { case 'B' : return byte . class ; case 'C' : return char . class ; case 'D' : return double . class ; case 'F' : return float . class ; case 'I' : return int . class ; case 'J' : return long . class ; case 'S' : return short . class ; case 'V' : return void . class ; ...
public class QuoteManager { /** * Remove the a tick callback * @ param symbol * @ param callback * @ return * @ throws BitfinexClientException */ public boolean removeTickCallback ( final BitfinexTickerSymbol symbol , final BiConsumer < BitfinexTickerSymbol , BitfinexTick > callback ) throws BitfinexClientExcep...
return tickerCallbacks . removeCallback ( symbol , callback ) ;
public class Utility { /** * Copy the application properties to this map . * @ param properties * @ param appProperties * @ return */ public static Map < String , Object > copyAppProperties ( Map < String , Object > properties , Map < String , Object > appProperties ) { } }
if ( appProperties != null ) { appProperties = Utility . putAllIfNew ( new HashMap < String , Object > ( ) , appProperties ) ; if ( appProperties . get ( Params . APP_NAME ) != null ) appProperties . remove ( Params . APP_NAME ) ; // if ( appProperties . get ( Params . MESSAGE _ SERVER ) ! = null ) // appProperties . r...
public class ApiOvhOrder { /** * Get prices and contracts information * REST : GET / order / dedicatedCloud / { serviceName } / upgradeRessource / { duration } * @ param upgradedRessourceType [ required ] The type of ressource you want to upgrade . * @ param upgradedRessourceId [ required ] The id of a particular...
String qPath = "/order/dedicatedCloud/{serviceName}/upgradeRessource/{duration}" ; StringBuilder sb = path ( qPath , serviceName , duration ) ; query ( sb , "upgradeType" , upgradeType ) ; query ( sb , "upgradedRessourceId" , upgradedRessourceId ) ; query ( sb , "upgradedRessourceType" , upgradedRessourceType ) ; Strin...
public class WrappedByteBuffer { /** * Puts segment of a single - byte array into the buffer at the current position . * @ param v * the source single - byte array * @ offset * the start position of source array * @ length * the length to put into WrappedByteBuffer * @ return the buffer */ public WrappedB...
_autoExpand ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { _buf . put ( v [ offset + i ] ) ; } return this ;
public class MongoDB { /** * Retrieves a list of mapped Morphia objects from MongoDB * @ param clazz The mapped Morphia class * @ param < T > JavaDoc requires this - please ignore * @ return A list of mapped Morphia objects or an empty list if none found */ public < T extends Object > List < T > findAll ( Class <...
Preconditions . checkNotNull ( clazz , "Tryed to get all morphia objects of a given object, but given object is null" ) ; return this . datastore . find ( clazz ) . asList ( ) ;
public class FFDC { /** * Gets and formats the specified thread ' s information . * @ param thread The thread to obtain the information from . * @ return A formatted string for the thread information . */ private static String getThreadInfo ( Thread thread ) { } }
final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Thread: " ) ; sb . append ( thread . getId ( ) ) ; sb . append ( " (" ) ; sb . append ( thread . getName ( ) ) ; sb . append ( ")" ) ; sb . append ( lineSeparator ) ; final StackTraceElement [ ] stack = thread . getStackTrace ( ) ; if ( stack . length ...
public class GosucUtil { /** * Special handling for the unusual structure of the IBM JDK . * @ return A list containing the special ' vm . jar ' absolute path if we are using an IBM JDK ; otherwise an empty list is returned . */ protected static List < String > getIbmClasspath ( ) { } }
List < String > retval = new ArrayList < > ( ) ; if ( System . getProperty ( "java.vendor" ) . equals ( "IBM Corporation" ) ) { String fileSeparator = System . getProperty ( "file.separator" ) ; String classpathSeparator = System . getProperty ( "path.separator" ) ; String [ ] bootClasspath = System . getProperty ( "su...
public class CSSParserVisitorImpl { /** * check if rule context contains error node * @ param ctx rule context * @ return contains context error node */ private boolean ctxHasErrorNode ( ParserRuleContext ctx ) { } }
for ( int i = 0 ; i < ctx . children . size ( ) ; i ++ ) { if ( ctx . getChild ( i ) instanceof ErrorNode ) { return true ; } } return false ;
public class UnifiedResponseDefaultSettings { /** * Sets a response header to the response according to the passed name and * value . An existing header entry with the same name is overridden . * @ param sName * Name of the header . May neither be < code > null < / code > nor empty . * @ param sValue * Value ...
ValueEnforcer . notEmpty ( sName , "Name" ) ; ValueEnforcer . notEmpty ( sValue , "Value" ) ; s_aRWLock . writeLocked ( ( ) -> s_aResponseHeaderMap . setHeader ( sName , sValue ) ) ;
public class CmsXmlContainerPageFactory { /** * Factory method to unmarshal ( read ) a container page instance from a OpenCms VFS file * that contains XML data , using wither the encoding set * in the XML file header , or the encoding set in the VFS file property . < p > * If you are not sure about the implicatio...
return unmarshal ( cms , file , keepEncoding , false ) ;
public class InnerMetricContext { /** * Register a given metric under a given name . * This method does not support registering { @ link com . codahale . metrics . MetricSet } s . * See { @ link # registerAll ( com . codahale . metrics . MetricSet ) } . * This method will not register a metric with the same name ...
if ( ! ( metric instanceof ContextAwareMetric ) ) { throw new UnsupportedOperationException ( "Can only register ContextAwareMetrics" ) ; } if ( this . contextAwareMetrics . putIfAbsent ( name , ( ( ContextAwareMetric ) metric ) . getInnerMetric ( ) ) != null ) { throw new IllegalArgumentException ( "A metric named " +...
public class SchemaServer { /** * For a given version and type ( Iced class simpleName ) return an appropriate new Schema object , if any . * If a higher version is asked for than is available ( e . g . , if the highest version of * Frame is FrameV2 and the client asks for the schema for ( Frame , 17 ) then an inst...
Class < ? extends Schema > clz = schemaClass ( version , type ) ; if ( clz == null ) clz = schemaClass ( EXPERIMENTAL_VERSION , type ) ; if ( clz == null ) throw new H2ONotFoundArgumentException ( "Failed to find schema for version: " + version + " and type: " + type , "Failed to find schema for version: " + version + ...
public class UntagResourceRequest { /** * The keys of the tags to remove from the user pool . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setTagKeys ( java . util . Collection ) } or { @ link # withTagKeys ( java . util . Collection ) } if you want to ove...
if ( this . tagKeys == null ) { setTagKeys ( new java . util . ArrayList < String > ( tagKeys . length ) ) ; } for ( String ele : tagKeys ) { this . tagKeys . add ( ele ) ; } return this ;
public class Tags { /** * Resolves all the tags IDs ( name followed by value ) into the a map . * This function is the opposite of { @ link # resolveAll } . * @ param tsdb The TSDB to use for UniqueId lookups . * @ param tags The tag IDs to resolve . * @ return A map mapping tag names to tag values . * @ thro...
try { return resolveIdsAsync ( tsdb , tags ) . joinUninterruptibly ( ) ; } catch ( NoSuchUniqueId e ) { throw e ; } catch ( DeferredGroupException e ) { final Throwable ex = Exceptions . getCause ( e ) ; if ( ex instanceof NoSuchUniqueId ) { throw ( NoSuchUniqueId ) ex ; } // TODO process e . results ( ) throw new Runt...
public class BaseClassFinderService { /** * Find the currently installed bundle that exports this package . * @ param bundleContext * @ param resource * @ return */ public Bundle findBundle ( Object objResource , Object bundleContext , String packageName , String versionRange ) { } }
if ( bundleContext == null ) bundleContext = this . bundleContext ; if ( bundleContext == null ) return null ; if ( objResource == null ) return BaseClassFinderService . findBundle ( ( BundleContext ) bundleContext , packageName , versionRange ) ; Bundle [ ] bundles = ( ( BundleContext ) bundleContext ) . getBundles ( ...
public class CalendarView { /** * Sends the request to the calendar view to display the given date and * time . The view will switch to the { @ link DayPage } and set the value of * { @ link # dateProperty ( ) } to the date and { @ link # requestedTimeProperty ( ) } * to the time . * @ param dateTime the date a...
requireNonNull ( dateTime ) ; if ( ! dayPage . isHidden ( ) ) { selectedPage . set ( getDayPage ( ) ) ; } else if ( ! weekPage . isHidden ( ) ) { selectedPage . set ( getWeekPage ( ) ) ; } else if ( ! monthPage . isHidden ( ) ) { selectedPage . set ( getMonthPage ( ) ) ; } else if ( ! yearPage . isHidden ( ) ) { select...
public class VirtualMachineScaleSetRollingUpgradesInner { /** * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version . Instances which are already running the latest available OS version are not affected . * @ param resourceGroupName The name of th...
return startOSUpgradeWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { @ Override public OperationStatusResponseInner call ( ServiceResponse < OperationStatusResponseInner > response ) { return resp...
public class MatchmakingRuleSetMarshaller { /** * Marshall the given parameter object . */ public void marshall ( MatchmakingRuleSet matchmakingRuleSet , ProtocolMarshaller protocolMarshaller ) { } }
if ( matchmakingRuleSet == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( matchmakingRuleSet . getRuleSetName ( ) , RULESETNAME_BINDING ) ; protocolMarshaller . marshall ( matchmakingRuleSet . getRuleSetBody ( ) , RULESETBODY_BINDING ) ; pr...
public class ParameterUtil { /** * Get child dependent parameters * @ param report next report object * @ param p current parameter * @ return a map of all parameters that use the current parameter in theirs source definition */ public static Map < String , QueryParameter > getChildDependentParameters ( Report re...
if ( report == null ) { return new HashMap < String , QueryParameter > ( ) ; } return getChildDependentParameters ( report . getParameters ( ) , p ) ;
public class Permission { /** * Add a Group to the particular role * @ param group * @ param role */ protected void addGroupToRole ( String group , String role ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "addGroupToRole" , new Object [ ] { group , role } ) ; } Set < String > groupsForTheRole = roleToGroupMap . get ( role ) ; if ( groupsForTheRole != null ) { groupsForTheRole . add ( group ) ; } else { groupsFo...
public class SQLCommand { /** * Application entry point */ public static void main ( String args [ ] ) { } }
System . setProperty ( "voltdb_no_logging" , "true" ) ; int exitCode = mainWithReturnCode ( args ) ; System . exit ( exitCode ) ;
public class InjectorConfiguration { /** * Returns a factory instance to instantiate a certain class . * @ param classDefinition the class that is to be instantiated . * @ param < T > the type of the class to be instantiated . * @ return a factory method for the specified class . */ @ Nullable public < T > Provid...
// noinspection unchecked return factories . getScope ( scope ) . get ( classDefinition ) ;
public class ApplicationsImpl { /** * Lists all of the applications available in the specified account . * This operation returns only applications and versions that are available for use on compute nodes ; that is , that can be used in an application package reference . For administrator information about applicatio...
return listSinglePageAsync ( applicationListOptions ) . concatMap ( new Func1 < ServiceResponseWithHeaders < Page < ApplicationSummary > , ApplicationListHeaders > , Observable < ServiceResponseWithHeaders < Page < ApplicationSummary > , ApplicationListHeaders > > > ( ) { @ Override public Observable < ServiceResponseW...
public class SummernoteFocusEvent { /** * Fires a summernote focus event on all registered handlers in the handler * manager . If no such handlers exist , this method will do nothing . * @ param source the source of the handlers */ public static void fire ( final HasSummernoteFocusHandlers source ) { } }
if ( TYPE != null ) { SummernoteFocusEvent event = new SummernoteFocusEvent ( ) ; source . fireEvent ( event ) ; }
public class ResolveSource { /** * Conceptually , this is key . value ( ) . resolveSubstitutions ( ) but using the * replacement for key . value ( ) if any . */ AbstractConfigValue resolveCheckingReplacement ( ResolveContext context , AbstractConfigValue original ) throws NotPossibleToResolve { } }
AbstractConfigValue replacement ; replacement = replacement ( context , original ) ; if ( replacement != original ) { // start over , checking if replacement was memoized return context . resolve ( replacement ) ; } else { AbstractConfigValue resolved ; resolved = original . resolveSubstitutions ( context ) ; return re...
public class InventoryGroupMarshaller { /** * Marshall the given parameter object . */ public void marshall ( InventoryGroup inventoryGroup , ProtocolMarshaller protocolMarshaller ) { } }
if ( inventoryGroup == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( inventoryGroup . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( inventoryGroup . getFilters ( ) , FILTERS_BINDING ) ; } catch ( Exception e ) { throw new ...
public class StatementTable { /** * { @ inheritDoc } */ @ Override protected void _from ( ObjectInput in ) throws IOException , ClassNotFoundException { } }
// 1 : read number of stmts final int stmts = in . readInt ( ) ; statements = sizedArrayList ( stmts ) ; for ( int i = 0 ; i < stmts ; i ++ ) { TableStatement ts = new TableStatement ( ) ; // 1 : read each table statement ts . readExternal ( in ) ; // 2 : read the relevant document index final int did = in . readInt ( ...
public class ObjectWritableCodec { /** * Decode Hadoop Writable object from a byte array . * @ param buffer serialized version of the Writable object ( as a byte array ) . * @ return a Writable object . * @ throws RemoteRuntimeException if deserialization fails . */ @ Override public T decode ( final byte [ ] buf...
try ( final ByteArrayInputStream bis = new ByteArrayInputStream ( buffer ) ; final DataInputStream dis = new DataInputStream ( bis ) ) { final T writable = this . writableClass . newInstance ( ) ; writable . readFields ( dis ) ; return writable ; } catch ( final IOException | InstantiationException | IllegalAccessExcep...
public class LockStrategy { /** * PQ53065 */ public boolean lock ( EJSContainer c , ContainerTx tx , Object lockName , int mode ) throws LockException { } }
// This method intentionally left blank . return true ;
public class AbstractAdminstrationDao { /** * Closes all open idle connections . The current data source * must have superuser rights . * This can be used if a another database action needs full access to a database , * e . g . when deleting and then creating it * @ param databasename */ protected void closeAll...
String sql = "SELECT pg_terminate_backend(pg_stat_activity.pid)\n" + "FROM pg_stat_activity\n" + "WHERE pg_stat_activity.datname = ?\n" + " AND pid <> pg_backend_pid();" ; try ( Connection conn = getDataSource ( ) . getConnection ( ) ) { DatabaseMetaData meta = conn . getMetaData ( ) ; if ( meta . getDatabaseMajorVers...
public class JobQueuesManager { /** * Method removes the jobs from both running and waiting job queue in * job queue manager . */ private void jobCompleted ( JobInProgress job , JobSchedulingInfo oldInfo , QueueInfo qi ) { } }
LOG . info ( "Job " + job . getJobID ( ) . toString ( ) + " submitted to queue " + job . getProfile ( ) . getQueueName ( ) + " has completed" ) ; // remove jobs from both queue ' s a job can be in // running and waiting queue at the same time . qi . removeRunningJob ( oldInfo ) ; qi . removeWaitingJob ( oldInfo ) ; // ...
public class Syslog { /** * When installed , System . out and System . err are redirected to Syslog . log . * System . out produces info events , and System . err produces error events . */ public static void install ( ) { } }
synchronized ( log ( ) ) { if ( ! cInstalled ) { cInstalled = true ; cOriginalOut = System . out ; cOriginalErr = System . err ; cSystemOut = new LogEventParsingOutputStream ( log ( ) , LogEvent . INFO_TYPE ) { public boolean isEnabled ( ) { return log ( ) . isInfoEnabled ( ) ; } } ; cSystemOut . addLogListener ( log (...
public class JsEventBusImpl { /** * Add a handler for feature selection . */ public JsHandlerRegistration addFeatureSelectionHandler ( final FeatureSelectedHandler selectedHandler , final FeatureDeselectedHandler deselectedHandler ) { } }
if ( ( ( MapImpl ) map ) . getMapWidget ( ) . getMapModel ( ) . isInitialized ( ) ) { return addFeatureSelectionHandler2 ( selectedHandler , deselectedHandler ) ; } final CallbackHandlerRegistration callbackRegistration = new CallbackHandlerRegistration ( ) ; ( ( MapImpl ) map ) . getMapWidget ( ) . getMapModel ( ) . a...
public class Main { /** * This method calculates the perimeter of a triangle using the lengths of its sides . * Examples : * calculatePerimeter ( 10 , 20 , 30 ) - > 60 * calculatePerimeter ( 3 , 4 , 5 ) - > 12 * calculatePerimeter ( 25 , 35 , 45 ) - > 105 * Parameters : * a ( int or float ) : The length of ...
double perimeter = a + b + c ; return perimeter ;
public class SecretBox { /** * Decrypt a ciphertext using the given key and nonce . * @ param nonce a 24 - byte nonce * @ param ciphertext the encrypted message * @ return an { @ link Optional } of the original plaintext , or if either the key , nonce , or * ciphertext was modified , an empty { @ link Optional ...
final XSalsa20Engine xsalsa20 = new XSalsa20Engine ( ) ; final Poly1305 poly1305 = new Poly1305 ( ) ; // initialize XSalsa20 xsalsa20 . init ( false , new ParametersWithIV ( new KeyParameter ( key ) , nonce ) ) ; // generate mac subkey final byte [ ] sk = new byte [ Keys . KEY_LEN ] ; xsalsa20 . processBytes ( sk , 0 ,...
public class LaContainerBuilderUtils { public static boolean resourceExists ( String path , AbstractLaContainerBuilder builder ) { } }
InputStream is ; try { is = builder . getResourceResolver ( ) . getInputStream ( path ) ; } catch ( IORuntimeException ex ) { if ( ex . getCause ( ) instanceof FileNotFoundException ) { return false ; } else { throw ex ; } } if ( is == null ) { return false ; } else { try { is . close ( ) ; } catch ( IOException ignore...
public class WebSecurityScannerClient { /** * Gets a Finding . * < p > Sample code : * < pre > < code > * try ( WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient . create ( ) ) { * FindingName name = FindingName . of ( " [ PROJECT ] " , " [ SCAN _ CONFIG ] " , " [ SCAN _ RUN ] " , " [...
GetFindingRequest request = GetFindingRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getFinding ( request ) ;
public class Img { /** * 缩放图像 ( 按长宽缩放 ) < br > * 注意 : 目标长宽与原图不成比例会变形 * @ param width 目标宽度 * @ param height 目标高度 * @ return this */ public Img scale ( int width , int height ) { } }
final BufferedImage srcImg = getValidSrcImg ( ) ; int srcHeight = srcImg . getHeight ( ) ; int srcWidth = srcImg . getWidth ( ) ; int scaleType ; if ( srcHeight == height && srcWidth == width ) { // 源与目标长宽一致返回原图 this . targetImage = srcImg ; return this ; } else if ( srcHeight < height || srcWidth < width ) { // 放大图片使用...
public class BufferedWriter { /** * Prints a string . * @ exception IOException * if an I / O error has occurred */ public void print ( String s ) throws IOException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { // 306998.15 Tr . debug ( tc , "print --> " + s ) ; } if ( ! _hasWritten && obs != null ) { _hasWritten = true ; obs . alertFirstWrite ( ) ; } int len = s . length ( ) ; if ( limit > - 1 ) { if ( total + len > limit ) { len = ( int ) ( limit -...
public class FSDataset { /** * { @ inheritDoc } */ public Block getStoredBlock ( int namespaceId , long blkid , boolean useOnDiskLength ) throws IOException { } }
lock . readLock ( ) . lock ( ) ; try { ReplicaToRead replica = getReplicaToRead ( namespaceId , new Block ( blkid ) ) ; if ( replica == null ) { return null ; } File blockfile = replica . getDataFileToRead ( ) ; if ( blockfile == null ) { return null ; } File metafile = null ; if ( ! replica . isInlineChecksum ( ) ) { ...
public class AbstractUserObject { /** * Returns for given parameter < i > _ name < / i > the instance of class * { @ link AbstractUserObject } . The returned AbstractUserObject can be a * { @ link Role } , { @ link Group } , { @ link Company } , { @ link Consortium } * or { @ link Person } . It is searched in the...
AbstractUserObject ret = UUIDUtil . isUUID ( _name ) ? Role . get ( UUID . fromString ( _name ) ) : Role . get ( _name ) ; if ( ret == null ) { ret = UUIDUtil . isUUID ( _name ) ? Group . get ( UUID . fromString ( _name ) ) : Group . get ( _name ) ; } if ( ret == null ) { ret = UUIDUtil . isUUID ( _name ) ? Company . g...
public class DefaultServiceRegistry { /** * - - - GET LOCAL SERVICE - - - */ @ Override public Service getService ( String name ) { } }
Service service = null ; long stamp = lock . tryOptimisticRead ( ) ; if ( stamp != 0 ) { try { service = services . get ( name ) ; } catch ( Exception modified ) { stamp = 0 ; } } if ( ! lock . validate ( stamp ) || stamp == 0 ) { stamp = lock . readLock ( ) ; try { service = services . get ( name ) ; } finally { lock ...
public class JcrGroovyCompiler { /** * Compile Groovy source that located in < code > files < / code > . Compiled sources * can be dependent to each other and dependent to Groovy sources that are * accessible for this compiler and with additional Groovy sources * < code > src < / code > . < b > NOTE < / b > To be...
return doCompile ( ( JcrGroovyClassLoader ) classLoaderProvider . getGroovyClassLoader ( src ) , files ) ;
public class LocationDirector { /** * Requests that this client be moved to the specified place . A request will be made and when * the response is received , the location observers will be notified of success or failure . * @ return true if the move to request was issued , false if it was rejected by a location ...
// make sure the placeId is valid if ( placeId < 0 ) { log . warning ( "Refusing moveTo(): invalid placeId " + placeId + "." ) ; return false ; } // first check to see if our observers are happy with this move request if ( ! mayMoveTo ( placeId , null ) ) { return false ; } // we need to call this both to mark that we ...
public class RebindOperationRecorder { /** * @ see org . springframework . ldap . support . transaction . CompensatingTransactionOperationRecorder # recordOperation ( java . lang . Object [ ] ) */ public CompensatingTransactionOperationExecutor recordOperation ( Object [ ] args ) { } }
if ( args == null || args . length != 3 ) { throw new IllegalArgumentException ( "Invalid arguments for bind operation" ) ; } Name dn = LdapTransactionUtils . getFirstArgumentAsName ( args ) ; Object object = args [ 1 ] ; Attributes attributes = null ; if ( args [ 2 ] != null && ! ( args [ 2 ] instanceof Attributes ) )...
public class ns_conf_upgrade_history { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString ns_conf_upgradefile_validator = new MPSString ( ) ; ns_conf_upgradefile_validator . validate ( operationType , ns_conf_upgradefile , "\"ns_conf_upgradefile\"" ) ; MPSIPAddress ns_ip_address_validator = new MPSIPAddress ( ) ; ns_ip_address_validator . validate ( operationTy...
public class Scope { /** * Attempt to bind variable reference to a variable in this scope or a * parent scope . If the variable to bind to isn ' t available or doesn ' t * exist , false is returned . * @ return true if reference has been bound */ public boolean bindToVariable ( VariableRef ref ) { } }
String name = ref . getName ( ) ; Variable var = getDeclaredVariable ( name ) ; if ( var != null ) { ref . setType ( null ) ; ref . setVariable ( var ) ; mVariableRefs . add ( ref ) ; return true ; } else { return false ; }
public class JsonArray { /** * Adds the specified character to self . * @ param character the character that needs to be added to the array . */ public void add ( Character character ) { } }
elements . add ( character == null ? JsonNull . INSTANCE : new JsonPrimitive ( character ) ) ;
public class BaseMonetaryConversionsSingletonSpi { /** * Access the current registered { @ link javax . money . convert . ExchangeRateProvider } instances . If no provider * names are passed ALL current registered providers are returned in undefined order . * @ param providers the provider names of hte providers to...
List < ExchangeRateProvider > provInstances = new ArrayList < > ( ) ; Collection < String > providerNames = Arrays . asList ( providers ) ; if ( providerNames . isEmpty ( ) ) { providerNames = getProviderNames ( ) ; } for ( String provName : providerNames ) { ExchangeRateProvider provider = getExchangeRateProvider ( pr...
public class InterceptorMetaDataHelper { /** * Populate the IntercetorMap for the EJB module with the metadata from the * WCCM objects created from ejb - jar . xml file of the EJB module . See { @ link com . ibm . ejs . csi . EJBModuleMetaDataImpl # ivInterceptorsMap } for details * about this map . * @ param int...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "populateInterceptorsMap" ) ; } // Get the list of Interceptor objects from the WCCM Interceptors object // passed as argument to this method . List < Interceptor > interceptorList = interceptors . getInterceptorList ( ) ; Ha...
public class NIODirectorySocket { /** * { @ inheritDoc } */ @ Override public void cleanup ( ) { } }
if ( nioThread != null ) { nioThread . toStop ( ) ; } if ( selectionKey != null ) { SocketChannel sock = ( SocketChannel ) selectionKey . channel ( ) ; selectionKey . cancel ( ) ; try { sock . socket ( ) . shutdownInput ( ) ; } catch ( IOException e ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Ignoring ex...
public class GobblinClusterManager { /** * Stop the application launcher then any services that were started outside of the application launcher */ private void stopAppLauncherAndServices ( ) { } }
try { this . applicationLauncher . stop ( ) ; } catch ( ApplicationException ae ) { LOGGER . error ( "Error while stopping Gobblin Cluster application launcher" , ae ) ; } if ( this . jobCatalog instanceof Service ) { ( ( Service ) this . jobCatalog ) . stopAsync ( ) . awaitTerminated ( ) ; }
public class SqlConnRunner { /** * 查询 < br > * 此方法不会关闭Connection * @ param < T > 结果对象类型 * @ param conn 数据库连接对象 * @ param query { @ link Query } * @ param rsh 结果集处理对象 * @ return 结果对象 * @ throws SQLException SQL执行异常 */ public < T > T find ( Connection conn , Query query , RsHandler < T > rsh ) throws SQLExc...
checkConn ( conn ) ; Assert . notNull ( query , "[query] is null !" ) ; PreparedStatement ps = null ; try { ps = dialect . psForFind ( conn , query ) ; return SqlExecutor . query ( ps , rsh ) ; } catch ( SQLException e ) { throw e ; } finally { DbUtil . close ( ps ) ; }
public class ResourceAssignment { /** * Retrieves the calendar used for this resource assignment . * @ return ProjectCalendar instance */ public ProjectCalendar getCalendar ( ) { } }
ProjectCalendar calendar = null ; Resource resource = getResource ( ) ; if ( resource != null ) { calendar = resource . getResourceCalendar ( ) ; } Task task = getTask ( ) ; if ( calendar == null || task . getIgnoreResourceCalendar ( ) ) { calendar = task . getEffectiveCalendar ( ) ; } return calendar ;
public class SignatureGenerator { /** * FormalTypeParameters : * < FormalTypeParameter + > * FormalTypeParameter : * Identifier ClassBound InterfaceBound * */ private void genOptFormalTypeParameters ( List < ? extends TypeParameterElement > typeParameters , StringBuilder sb ) { } }
if ( ! typeParameters . isEmpty ( ) ) { sb . append ( '<' ) ; for ( TypeParameterElement typeParam : typeParameters ) { genFormalTypeParameter ( typeParam , sb ) ; } sb . append ( '>' ) ; }
public class PluginValueExtender { /** * Create all getter * @ param aOutline * JAXB outline * @ param aAllCtorClasses * Map from class with value ( direct and derived ) to value type */ private static void _addValueGetter ( @ Nonnull final Outline aOutline , @ Nonnull final Map < JClass , JType > aAllCtorClass...
final JCodeModel aCodeModel = aOutline . getCodeModel ( ) ; // For all generated classes for ( final ClassOutline aClassOutline : aOutline . getClasses ( ) ) { // Get the implementation class final JDefinedClass jClass = aClassOutline . implClass ; // For all methods in the class ( copy ! ) for ( final JMethod aMethod ...
public class GetMaintenanceWindowExecutionTaskRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetMaintenanceWindowExecutionTaskRequest getMaintenanceWindowExecutionTaskRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getMaintenanceWindowExecutionTaskRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getMaintenanceWindowExecutionTaskRequest . getWindowExecutionId ( ) , WINDOWEXECUTIONID_BINDING ) ; protocolMarshaller . marshall ( getMaintenan...
public class WebcamUtils { /** * Get resource bundle for specific class . * @ param clazz the class for which resource bundle should be found * @ param locale the { @ link Locale } object * @ return Resource bundle */ public static final ResourceBundle loadRB ( Class < ? > clazz , Locale locale ) { } }
String pkg = WebcamUtils . class . getPackage ( ) . getName ( ) . replaceAll ( "\\." , "/" ) ; return PropertyResourceBundle . getBundle ( String . format ( "%s/i18n/%s" , pkg , clazz . getSimpleName ( ) ) ) ;
public class ScannerParam { /** * Sets whether or not the HTTP Headers of all requests should be scanned , not just requests that send parameters , through * the query or request body . * @ param scanAllRequests { @ code true } if the HTTP Headers of all requests should be scanned , { @ code false } otherwise * @...
if ( scanAllRequests == scanHeadersAllRequests ) { return ; } this . scanHeadersAllRequests = scanAllRequests ; getConfig ( ) . setProperty ( SCAN_HEADERS_ALL_REQUESTS , this . scanHeadersAllRequests ) ;
public class DatastoreException { /** * Translate RetryHelperException to the DatastoreException that caused the error . This method * will always throw an exception . * @ throws DatastoreException when { @ code ex } was caused by a { @ code DatastoreException } */ static DatastoreException translateAndThrow ( Retr...
BaseServiceException . translate ( ex ) ; throw new DatastoreException ( UNKNOWN_CODE , ex . getMessage ( ) , null , ex . getCause ( ) ) ;
public class PluralRulesLoader { /** * Returns the locales for which we have plurals data . Utility for testing . */ public ULocale [ ] getAvailableULocales ( ) { } }
Set < String > keys = getLocaleIdToRulesIdMap ( PluralType . CARDINAL ) . keySet ( ) ; ULocale [ ] locales = new ULocale [ keys . size ( ) ] ; int n = 0 ; for ( Iterator < String > iter = keys . iterator ( ) ; iter . hasNext ( ) ; ) { locales [ n ++ ] = ULocale . createCanonical ( iter . next ( ) ) ; } return locales ;
public class PhotosetsApi { /** * Get the list of photos in a set . * < br > * This method does not require authentication . * @ param photosetId id of the photoset to return photos for . Required . * @ param photoExtras Optional . A list of extra information to fetch for the primary photo . Currently supported...
JinxUtils . validateParams ( photosetId ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.photosets.getPhotos" ) ; params . put ( "photoset_id" , photosetId ) ; if ( ! JinxUtils . isNullOrEmpty ( photoExtras ) ) { params . put ( "extras" , JinxUtils . buildCommaDelimitedList (...
public class LinuxResourceCalculatorPlugin { /** * Read / proc / meminfo , parse and compute memory information * @ param readAgain if false , read only on the first time */ private void readProcMemInfoFile ( boolean readAgain ) { } }
if ( readMemInfoFile && ! readAgain ) { return ; } // Read " / proc / memInfo " file BufferedReader in = null ; FileReader fReader = null ; try { fReader = new FileReader ( procfsMemFile ) ; in = new BufferedReader ( fReader ) ; } catch ( FileNotFoundException f ) { // shouldn ' t happen . . . . return ; } Matcher mat ...
public class druidGLexer { /** * $ ANTLR start " WHERE " */ public final void mWHERE ( ) throws RecognitionException { } }
try { int _type = WHERE ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 629:8 : ( ( ' WHERE ' | ' where ' ) ) // druidG . g : 629:10 : ( ' WHERE ' | ' where ' ) { // druidG . g : 629:10 : ( ' WHERE ' | ' where ' ) int alt18 = 2 ; int LA18_0 = input . LA ( 1 ) ; if ( ( LA18_0 == 'W' ) ) { alt18 = 1 ; } else if ...
public class ConfigValidator { /** * Validates the given { @ link ReplicatedMapConfig } . * @ param replicatedMapConfig the { @ link ReplicatedMapConfig } to check * @ param mergePolicyProvider the { @ link com . hazelcast . replicatedmap . merge . MergePolicyProvider } * to resolve merge policy classes */ public...
checkReplicatedMapMergePolicy ( replicatedMapConfig , mergePolicyProvider ) ;
public class XNElement { /** * Parse an XML from the supplied URL . * @ param url the target URL * @ return the parsed XML * @ throws IOException if an I / O error occurs * @ throws XMLStreamException if a parser error occurs */ public static XNElement parseXML ( URL url ) throws IOException , XMLStreamExceptio...
try ( InputStream in = new BufferedInputStream ( url . openStream ( ) ) ) { return parseXML ( in ) ; }
public class DefaultJobProgressStep { /** * Add children to the step and return the first one . * @ param steps the number of step * @ param newLevelSource who asked to create this new level * @ param levelStep the new level can contains only one step * @ return the new step */ public DefaultJobProgressStep add...
assertModifiable ( ) ; this . maximumChildren = steps ; this . levelSource = newLevelSource ; if ( steps > 0 ) { this . childSize = 1.0D / steps ; } if ( this . maximumChildren > 0 ) { this . children = new ArrayList < > ( this . maximumChildren ) ; } else { this . children = new ArrayList < > ( ) ; } this . levelStep ...
public class MemberBuilder { /** * Sets the member host / port . * @ param host the host name * @ param port the port number * @ return the member builder * @ throws io . atomix . utils . net . MalformedAddressException if a valid { @ link Address } cannot be constructed from the arguments * @ deprecated sinc...
return withAddress ( Address . from ( host , port ) ) ;
public class P2sVpnGatewaysInner { /** * Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group . * @ param resourceGroupName The name of the resource group . * @ param gatewayName The name of the P2SVpnGateway . * @ param authenticationMethod VPN client Authentication Method . ...
return beginGenerateVpnProfileWithServiceResponseAsync ( resourceGroupName , gatewayName , authenticationMethod ) . toBlocking ( ) . single ( ) . body ( ) ;
public class HikariDataSource { /** * { @ inheritDoc } */ @ Override public boolean isWrapperFor ( Class < ? > iface ) throws SQLException { } }
if ( iface . isInstance ( this ) ) { return true ; } HikariPool p = pool ; if ( p != null ) { final DataSource unwrappedDataSource = p . getUnwrappedDataSource ( ) ; if ( iface . isInstance ( unwrappedDataSource ) ) { return true ; } if ( unwrappedDataSource != null ) { return unwrappedDataSource . isWrapperFor ( iface...
public class BlackBox { private void build_info_as_str ( int index ) { } }
// Convert time to a string SimpleDateFormat sdf = new SimpleDateFormat ( "dd/MM/yyyy HH:mm:ss:SS" ) ; sdf . setTimeZone ( TimeZone . getTimeZone ( "ECT" ) ) ; String da = sdf . format ( box [ index ] . when ) ; elt_str = new StringBuffer ( da ) ; // Add request type and command name in case of elt_str . append ( " : "...
public class CommunityGatewayConfigTranslatorFactorySpi { /** * Given an incoming namespace , return the translator pipeline * to translate a document with that namespace up to the ' current ' format . * @ param ns * @ return */ @ Override public GatewayConfigTranslator getTranslator ( GatewayConfigNamespace ns )...
// First , we create our pipeline composite GatewayConfigTranslatorPipeline result = null ; if ( ns . equals ( GatewayConfigNamespace . SEPTEMBER_2014 ) ) { result = new GatewayConfigTranslatorPipeline ( ) ; GatewayConfigTranslator september2014Translator = new September2014ToNovember2015Translator ( ) ; result . addTr...
public class HttpJsonSerializer { /** * Parses a single UIDMeta object * @ throws JSONException if parsing failed * @ throws BadRequestException if the content was missing or parsing failed */ public UIDMeta parseUidMetaV1 ( ) { } }
final String json = query . getContent ( ) ; if ( json == null || json . isEmpty ( ) ) { throw new BadRequestException ( HttpResponseStatus . BAD_REQUEST , "Missing message content" , "Supply valid JSON formatted data in the body of your request" ) ; } try { return JSON . parseToObject ( json , UIDMeta . class ) ; } ca...
public class UriTemplate { /** * Expand the string with the given parameters . * @ param parameters The parameters * @ return The expanded URI */ public String expand ( Map < String , Object > parameters ) { } }
StringBuilder builder = new StringBuilder ( ) ; boolean previousHasContent = false ; boolean anyPreviousHasOperator = false ; for ( PathSegment segment : segments ) { String result = segment . expand ( parameters , previousHasContent , anyPreviousHasOperator ) ; if ( result == null ) { break ; } if ( segment instanceof...
public class CommandHelper { /** * Convert the value according the type of DeviceData . * @ param shortValues * the value to insert on DeviceData * @ param deviceDataArgin * the DeviceData attribute to write * @ param dataType * the type of inserted data * @ throws DevFailed */ public static void insertFr...
// by default for xdim = 1 , send the sum . Double doubleSum = new Double ( 0 ) ; for ( final short shortValue : shortValues ) { doubleSum = doubleSum + shortValue ; } switch ( dataType ) { case TangoConst . Tango_DEV_SHORT : deviceDataArgin . insert ( doubleSum . shortValue ( ) ) ; break ; case TangoConst . Tango_DEV_...
public class AmazonSimpleEmailServiceClient { /** * Provides sending statistics for the current AWS Region . The result is a list of data points , representing the * last two weeks of sending activity . Each data point in the list contains statistics for a 15 - minute period of * time . * You can execute this ope...
request = beforeClientExecution ( request ) ; return executeGetSendStatistics ( request ) ;