signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JobCancellationsInner { /** * Cancels a job . This is an asynchronous operation . To know the status of the cancellation , call GetCancelOperationResult API . * @ param vaultName The name of the recovery services vault . * @ param resourceGroupName The name of the resource group where the recovery serv...
triggerWithServiceResponseAsync ( vaultName , resourceGroupName , jobName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CouchbaseClientFactory { /** * ( non - Javadoc ) * @ see * com . impetus . kundera . loader . GenericClientFactory # initialize ( java . util . Map ) */ @ Override public void initialize ( Map < String , Object > puProperties ) { } }
reader = new CouchbaseEntityReader ( kunderaMetadata ) ; setExternalProperties ( puProperties ) ; initializePropertyReader ( ) ; PersistenceUnitMetadata pum = kunderaMetadata . getApplicationMetadata ( ) . getPersistenceUnitMetadata ( getPersistenceUnit ( ) ) ; Properties pumProps = pum . getProperties ( ) ; if ( puPro...
public class Curve25519 { /** * / * Signature verification primitive , calculates Y = vP + hG * Y [ out ] signature public key * v [ in ] signature value * h [ in ] signature hash * P [ in ] public key */ public static final void verify ( byte [ ] Y , byte [ ] v , byte [ ] h , byte [ ] P ) { } }
/* Y = v abs ( P ) + h G */ byte [ ] d = new byte [ 32 ] ; long10 [ ] p = new long10 [ ] { new long10 ( ) , new long10 ( ) } , s = new long10 [ ] { new long10 ( ) , new long10 ( ) } , yx = new long10 [ ] { new long10 ( ) , new long10 ( ) , new long10 ( ) } , yz = new long10 [ ] { new long10 ( ) , new long10 ( ) , new l...
public class SpiderThread { /** * Adds the given message to the sites tree . * @ param historyReference the history reference of the message , must not be { @ code null } * @ param message the actual message , must not be { @ code null } */ private void addMessageToSitesTree ( final HistoryReference historyReferenc...
if ( View . isInitialised ( ) && ! EventQueue . isDispatchThread ( ) ) { EventQueue . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { addMessageToSitesTree ( historyReference , message ) ; } } ) ; return ; } StructuralNode node = SessionStructure . addPath ( Model . getSingleton ( ) . getSession ( ) ,...
public class SqlServerParser { /** * 处理selectBody去除Order by * @ param selectBody */ protected void processSelectBody ( SelectBody selectBody , int level ) { } }
if ( selectBody instanceof PlainSelect ) { processPlainSelect ( ( PlainSelect ) selectBody , level + 1 ) ; } else if ( selectBody instanceof WithItem ) { WithItem withItem = ( WithItem ) selectBody ; if ( withItem . getSelectBody ( ) != null ) { processSelectBody ( withItem . getSelectBody ( ) , level + 1 ) ; } } else ...
public class RunbookDraftsInner { /** * Undo draft edit to last known published state identified by runbook name . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param runbookName The runbook name . * @ param serviceCallback...
return ServiceFuture . fromResponse ( undoEditWithServiceResponseAsync ( resourceGroupName , automationAccountName , runbookName ) , serviceCallback ) ;
public class JvmByteAnnotationValueImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case TypesPackage . JVM_BYTE_ANNOTATION_VALUE__VALUES : return values != null && ! values . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
public class ContentSpec { /** * Set the Bugzilla Keywords to be applied during building . * @ param bugzillaKeywords The keywords to be set in bugzilla . */ public void setBugzillaKeywords ( final String bugzillaKeywords ) { } }
if ( bugzillaKeywords == null && this . bugzillaKeywords == null ) { return ; } else if ( bugzillaKeywords == null ) { removeChild ( this . bugzillaKeywords ) ; this . bugzillaKeywords = null ; } else if ( this . bugzillaKeywords == null ) { this . bugzillaKeywords = new KeyValueNode < String > ( CommonConstants . CS_B...
public class MutablePeriod { /** * Parses a { @ code MutablePeriod } from the specified string using a formatter . * @ param str the string to parse , not null * @ param formatter the formatter to use , not null * @ since 2.0 */ public static MutablePeriod parse ( String str , PeriodFormatter formatter ) { } }
return formatter . parsePeriod ( str ) . toMutablePeriod ( ) ;
public class Symbol { /** * < p > Sets the font to use to render the human - readable text . This is an alternative to setting the * { @ link # setFontName ( String ) font name } and { @ link # setFontSize ( int ) font size } separately . May * allow some applications to avoid the use of { @ link GraphicsEnvironmen...
this . font = font ; this . fontName = font . getFontName ( ) ; this . fontSize = font . getSize ( ) ;
public class CmsPreviewDialog { /** * Loads preview for another locale . < p > * @ param locale the locale to load */ protected void loadOtherLocale ( final String locale ) { } }
CmsRpcAction < CmsPreviewInfo > previewAction = new CmsRpcAction < CmsPreviewInfo > ( ) { @ SuppressWarnings ( "synthetic-access" ) @ Override public void execute ( ) { if ( m_previewInfoProvider != null ) { m_previewInfoProvider . loadPreviewForLocale ( locale , this ) ; } else { CmsCoreProvider . getVfsService ( ) . ...
public class PermissionsImpl { /** * Adds a user to the allowed list of users to access this LUIS application . Users are added using their email address . * @ param appId The application ID . * @ param addOptionalParameter the object representing the optional parameters to be set before calling this API * @ thro...
return addWithServiceResponseAsync ( appId , addOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class KeyVaultClientBaseImpl { /** * Imports an externally created key , stores it , and returns key parameters and attributes to the client . * The import key operation may be used to import any key type into an Azure Key Vault . If the named key already exists , Azure Key Vault creates a new version of the k...
return importKeyWithServiceResponseAsync ( vaultBaseUrl , keyName , key , hsm , keyAttributes , tags ) . toBlocking ( ) . single ( ) . body ( ) ;
public class HibernateConfigProcessor { /** * Extracts all { @ link ClassMetadata } and { @ link CollectionMetadata } from a given { @ link SessionFactory } to be * used in determining the types that need a { @ link org . springframework . flex . core . io . SpringPropertyProxy } registered in { @ link # findTypesToR...
this . classMetadata . addAll ( sessionFactory . getAllClassMetadata ( ) . values ( ) ) ; this . collectionMetadata . addAll ( sessionFactory . getAllCollectionMetadata ( ) . values ( ) ) ; this . hibernateConfigured = true ;
public class BaseStatementHandler { /** * { @ inheritDoc } */ public void setStatement ( Statement statement , QueryParameters params ) throws SQLException { } }
AssertUtils . assertNotNull ( params ) ; PreparedStatement preparedStmt = ( PreparedStatement ) statement ; // check the parameter count , if we can ParameterMetaData pmd = null ; int stmtCount = - 1 ; int paramsCount = params == null ? 0 : params . orderSize ( ) ; try { if ( useMetadata == true ) { pmd = preparedStmt ...
public class AbstractBeanDefinition { /** * The default implementation which provides no injection . To be overridden by compile time tooling . * @ param resolutionContext The resolution context * @ param context The bean context * @ param bean The bean * @ return The injected bean */ @ Internal @ SuppressWarni...
"WeakerAccess" , "unused" } ) @ UsedByGeneratedCode protected Object injectBean ( BeanResolutionContext resolutionContext , BeanContext context , Object bean ) { return bean ;
public class QueryTerminalNode { public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } }
super . readExternal ( in ) ; query = ( QueryImpl ) in . readObject ( ) ; subrule = ( GroupElement ) in . readObject ( ) ; subruleIndex = in . readInt ( ) ; initDeclarations ( ) ;
public class StackAwareMethodVisitor { /** * Explicitly registers a label to define a given stack state . * @ param label The label to register a stack state for . * @ param stackSizes The stack sizes to assume when reaching the supplied label . */ public void register ( Label label , List < StackSize > stackSizes ...
sizes . put ( label , stackSizes ) ;
public class ServerModel { /** * Associates a http context with a bundle if the http service is not * already associated to another bundle . This is done in order to prevent * sharing http context between bundles . The implementation is not 100% * correct as it can be that at a certain moment in time when this me...
List < String > virtualHosts = resolveVirtualHosts ( bundle ) ; for ( String virtualHost : virtualHosts ) { ConcurrentMap < WebContainerContext , Bundle > virtualHostHttpContexts = httpContexts . get ( virtualHost ) ; if ( virtualHostHttpContexts == null ) { virtualHostHttpContexts = new ConcurrentHashMap < > ( ) ; htt...
public class ActiveConnectionRecord { /** * Initializes this connection record , associating it with the given user , * connection , balancing connection group , and sharing profile . The given * balancing connection group MUST be the connection group from which the * given connection was chosen , and the given s...
this . user = user ; this . balancingGroup = balancingGroup ; this . connection = connection ; this . sharingProfile = sharingProfile ;
public class ComparatorCompat { /** * Returns a comparator that reverses the order of the specified comparator . * If the specified comparator is { @ code null } , this method is equivalent * to { @ link # reverseOrder ( ) } . * @ param < T > the type of the objects compared by the comparator * @ param comparat...
return Collections . reverseOrder ( comparator ) ;
public class StringParser { /** * Finds a pattern . If succeeds the skipped text returnned from skipped ( ) method * @ param pattern * @ return * @ see java . util . regex . Matcher # find */ public boolean find ( Pattern pattern ) { } }
matcher . usePattern ( pattern ) ; int start = matcher . regionStart ( ) ; if ( matcher . find ( ) ) { stack . add ( new MatchResultImpl ( matcher ) ) ; matcher . region ( matcher . end ( ) , matcher . regionEnd ( ) ) ; return true ; } else { return false ; }
public class Searcher { /** * Searches the pattern in a given model , but instead of a match map , returns all matches in a * list . * @ param model model to search in * @ param pattern pattern to search for * @ return matching results */ public static List < Match > searchPlain ( Model model , Pattern pattern ...
List < Match > list = new LinkedList < Match > ( ) ; Map < BioPAXElement , List < Match > > map = search ( model , pattern ) ; for ( List < Match > matches : map . values ( ) ) { list . addAll ( matches ) ; } return list ;
public class CmsJspStandardContextBean { /** * Returns a caching hash specific to the element , it ' s properties and the current container width . < p > * @ return the caching hash */ public String elementCachingHash ( ) { } }
String result = "" ; if ( m_element != null ) { result = m_element . editorHash ( ) ; if ( m_container != null ) { result += "w:" + m_container . getWidth ( ) + "cName:" + m_container . getName ( ) + "cType:" + m_container . getType ( ) ; } } return result ;
public class ProactiveDetectionConfigurationsInner { /** * Update the ProactiveDetection configuration for this configuration id . * @ param resourceGroupName The name of the resource group . * @ param resourceName The name of the Application Insights component resource . * @ param configurationId The ProactiveDe...
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , resourceName , configurationId , proactiveDetectionProperties ) , serviceCallback ) ;
public class JsonReaderI { /** * called when json - smart done parsing a value */ public void setValue ( Object current , String key , Object value ) throws ParseException , IOException { } }
throw new RuntimeException ( ERR_MSG + " setValue in " + this . getClass ( ) + " key=" + key ) ;
public class Collator { /** * < strong > [ icu ] < / strong > Given a keyword , returns an array of all values for * that keyword that are currently in use . * @ param keyword one of the keywords returned by getKeywords . * @ see # getKeywords */ public static final String [ ] getKeywordValues ( String keyword ) ...
if ( ! keyword . equals ( KEYWORDS [ 0 ] ) ) { throw new IllegalArgumentException ( "Invalid keyword: " + keyword ) ; } return ICUResourceBundle . getKeywordValues ( BASE , RESOURCE ) ;
public class ComparableFilter { /** * Indicates the specified entity instance matches to this * { @ code ComparableFilter } . */ @ Override public boolean matches ( Object entity ) { } }
T left = property . get ( entity ) ; return operator ( ) . matches ( left . compareTo ( value ( ) ) ) ;
public class IfcGeometricSetImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcGeometricSetSelect > getElements ( ) { } }
return ( EList < IfcGeometricSetSelect > ) eGet ( Ifc4Package . Literals . IFC_GEOMETRIC_SET__ELEMENTS , true ) ;
public class EquivalentFragmentSets { /** * An { @ link EquivalentFragmentSet } that indicates a variable representing a concept with a particular ID . */ public static EquivalentFragmentSet id ( VarProperty varProperty , Variable start , ConceptId id ) { } }
return new AutoValue_IdFragmentSet ( varProperty , start , id ) ;
public class MoreExecutors { /** * An implementation of { @ link ExecutorService # invokeAny } for { @ link ListeningExecutorService } * implementations . */ @ GwtIncompatible static < T > T invokeAnyImpl ( ListeningExecutorService executorService , Collection < ? extends Callable < T > > tasks , boolean timed , long...
checkNotNull ( executorService ) ; checkNotNull ( unit ) ; int ntasks = tasks . size ( ) ; checkArgument ( ntasks > 0 ) ; List < Future < T > > futures = Lists . newArrayListWithCapacity ( ntasks ) ; BlockingQueue < Future < T > > futureQueue = Queues . newLinkedBlockingQueue ( ) ; long timeoutNanos = unit . toNanos ( ...
public class InductivePartialCharges { /** * Gets the paulingElectronegativities attribute of the * InductivePartialCharges object . * @ param ac AtomContainer * @ param modified if true , some values are modified by following the reference * @ return The pauling electronegativities */ public double [ ] getPaul...
double [ ] paulingElectronegativities = new double [ ac . getAtomCount ( ) ] ; IElement element = null ; String symbol = null ; int atomicNumber = 0 ; try { ifac = Isotopes . getInstance ( ) ; for ( int i = 0 ; i < ac . getAtomCount ( ) ; i ++ ) { IAtom atom = ac . getAtom ( i ) ; symbol = ac . getAtom ( i ) . getSymbo...
public class DebuggableThreadPoolExecutor { /** * Returns a ThreadPoolExecutor with a fixed number of threads . * When all threads are actively executing tasks , new tasks are queued . * If ( most ) threads are expected to be idle most of the time , prefer createWithMaxSize ( ) instead . * @ param threadPoolName ...
return createWithMaximumPoolSize ( threadPoolName , size , Integer . MAX_VALUE , TimeUnit . SECONDS ) ;
public class CaliperConfig { /** * TODO ( gak ) : make this work with different directory layouts . I ' m looking at you OS X . . . */ private static File getJdkHomeDir ( @ Nullable String baseDirectoryPath , @ Nullable String homeDirPath , String vmConfigName ) throws InvalidConfigurationException { } }
if ( homeDirPath == null ) { File baseDirectory = getBaseDirectory ( baseDirectoryPath ) ; File homeDir = new File ( baseDirectory , vmConfigName ) ; checkConfiguration ( homeDir . isDirectory ( ) , "%s is not a directory" , homeDir ) ; return homeDir ; } else { File potentialHomeDir = new File ( homeDirPath ) ; if ( p...
public class ValidatorVault { /** * Validate the create methods . */ private void createValidation ( Class < ? > vaultClass , Class < ? > assetClass , Class < ? > idClass ) { } }
for ( Method method : vaultClass . getMethods ( ) ) { if ( ! method . getName ( ) . startsWith ( "create" ) ) { continue ; } if ( ! Modifier . isAbstract ( method . getModifiers ( ) ) ) { continue ; } TypeRef resultRef = findResult ( method . getParameters ( ) ) ; if ( resultRef == null ) { continue ; } TypeRef typeRef...
public class DateContext { /** * Creates a date object based on the format passed in . Exceptions are NOT * thrown by this method and instead < code > null < / code > is returned . * Otherwise , this is identical to { @ link # createDate ( String , String ) } . * @ param dateString The string from which to create...
try { return createDate ( dateString , inputFormat ) ; } catch ( Exception exception ) { Syslog . debug ( "DateContextImpl.createDateWithValidation: Error " + "creating date with " + dateString + "/" + inputFormat + "; Exception: " + exception . getMessage ( ) ) ; } return null ;
public class CommonUtils { /** * 字符串转值 * @ param nums 多个数字 * @ param sperator 分隔符 * @ return int [ ] */ public static int [ ] parseInts ( String nums , String sperator ) { } }
String [ ] ss = StringUtils . split ( nums , sperator ) ; int [ ] ints = new int [ ss . length ] ; for ( int i = 0 ; i < ss . length ; i ++ ) { ints [ i ] = Integer . parseInt ( ss [ i ] ) ; } return ints ;
public class AbstractDependenceMeasure { /** * Compute ranks of all objects , ranging from 1 to len . * Ties are given the average rank . * @ param adapter Data adapter * @ param data Data array * @ param len Length of data * @ return Array of scores */ protected static < A > double [ ] ranks ( final NumberAr...
return ranks ( adapter , data , sortedIndex ( adapter , data , len ) ) ;
public class StandaloneAetherArtifactFileResolver { /** * Retrieves the standard remote repositories , i . e . , maven central and jboss . org * @ return */ public static List < RemoteRepository > getStandardRemoteRepositories ( ) { } }
final List < RemoteRepository > remoteRepositories = new ArrayList < > ( ) ; remoteRepositories . add ( new RemoteRepository . Builder ( "central" , "default" , "https://central.maven.org/maven2/" ) . build ( ) ) ; remoteRepositories . add ( new RemoteRepository . Builder ( "jboss-community-repository" , "default" , "h...
public class Index { /** * Get an object from this index * @ param objectID the unique identifier of the object to retrieve * @ param attributesToRetrieve contains the list of attributes to retrieve . */ public JSONObject getObject ( String objectID , List < String > attributesToRetrieve ) throws AlgoliaException {...
return this . getObject ( objectID , attributesToRetrieve , RequestOptions . empty ) ;
public class ClassUtils { /** * Given a type , this method resolves the corresponding raw type . * This method works if { @ code type } is of type { @ link Class } , or { @ link ParameterizedType } . * Its shortcoming is that it cannot resolve { @ link TypeVariable } and will always return { @ code Object . class }...
if ( type instanceof Class ) { return ( Class < ? > ) type ; } else if ( type instanceof ParameterizedType ) { return getRawType ( ( ( ParameterizedType ) type ) . getRawType ( ) ) ; } else if ( type instanceof TypeVariable < ? > ) { return getRawType ( ( ( TypeVariable < ? > ) type ) . getBounds ( ) [ 0 ] ) ; } throw ...
public class CoNLLBenchmark { private static String getWordShape ( String string ) { } }
if ( string . toUpperCase ( ) . equals ( string ) && string . toLowerCase ( ) . equals ( string ) ) return "no-case" ; if ( string . toUpperCase ( ) . equals ( string ) ) return "upper-case" ; if ( string . toLowerCase ( ) . equals ( string ) ) return "lower-case" ; if ( string . length ( ) > 1 && Character . isUpperCa...
public class MapperScannerConfigurer { /** * This property specifies the parent that the scanner will search for . * The scanner will register all interfaces in the base package that also have the * specified interface class as a parent . * Note this can be combined with annotationClass . * @ param superClass p...
this . markerInterface = superClass ; if ( Marker . class . isAssignableFrom ( superClass ) ) { mapperHelper . registerMapper ( superClass ) ; }
public class CloudSpannerStatement { /** * Does some formatting to DDL statements that might have been generated by standard SQL * generators to make it compatible with Google Cloud Spanner . We also need to get rid of any * comments , as Google Cloud Spanner does not accept comments in DDL - statements . * @ par...
String result = removeComments ( sql ) ; String [ ] parts = getTokens ( sql , 0 ) ; if ( parts . length > 2 && parts [ 0 ] . equalsIgnoreCase ( "create" ) && parts [ 1 ] . equalsIgnoreCase ( "table" ) ) { String sqlWithSingleSpaces = String . join ( " " , parts ) ; int primaryKeyIndex = sqlWithSingleSpaces . toUpperCas...
public class HttpBuilder { /** * Executes a PATCH request on the configured URI , with additional configuration provided by the configuration closure . The result will be cast to * the specified ` type ` . * [ source , groovy ] * def http = HttpBuilder . configure { * request . uri = ' http : / / localhost : 10...
return type . cast ( interceptors . get ( HttpVerb . PATCH ) . apply ( configureRequest ( type , HttpVerb . PATCH , closure ) , this :: doPatch ) ) ;
public class XsdAsmUtils { /** * Obtains the signature for a class given the interface names . * @ param interfaces The implemented interfaces . * @ param className The class name . * @ param apiName The name of the generated fluent interface . * @ return The signature of the class . */ static String getClassSi...
StringBuilder signature ; signature = new StringBuilder ( "<Z::" + XsdSupportingStructure . elementTypeDesc + ">" + JAVA_OBJECT_DESC ) ; if ( interfaces != null ) { for ( String anInterface : interfaces ) { signature . append ( "L" ) . append ( getFullClassTypeName ( anInterface , apiName ) ) . append ( "<L" ) . append...
public class DiskTypeClient { /** * Returns the specified disk type . Gets a list of available disk types by making a list ( ) * request . * < p > Sample code : * < pre > < code > * try ( DiskTypeClient diskTypeClient = DiskTypeClient . create ( ) ) { * ProjectZoneDiskTypeName diskType = ProjectZoneDiskTypeNa...
GetDiskTypeHttpRequest request = GetDiskTypeHttpRequest . newBuilder ( ) . setDiskType ( diskType ) . build ( ) ; return getDiskType ( request ) ;
public class CoordinatorResource { /** * This is an unsecured endpoint , defined as such in UNSECURED _ PATHS in CoordinatorJettyServerInitializer */ @ GET @ Path ( "/isLeader" ) @ Produces ( MediaType . APPLICATION_JSON ) public Response isLeader ( ) { } }
final boolean leading = coordinator . isLeader ( ) ; final Map < String , Boolean > response = ImmutableMap . of ( "leader" , leading ) ; if ( leading ) { return Response . ok ( response ) . build ( ) ; } else { return Response . status ( Response . Status . NOT_FOUND ) . entity ( response ) . build ( ) ; }
public class Container { /** * Assembles the specified component instance by injecting the dependent * components into it . * The assembled component instance is < b > not < / b > managed by the container . * @ param < T > The component type . * @ param component The component instance that the dependent compon...
Preconditions . checkArgument ( component != null , "Parameter 'component' must not be [" + component + "]" ) ; Descriptor < T > descriptor = new Descriptor < T > ( ( Class < T > ) component . getClass ( ) ) ; return new Assembler < T > ( this , descriptor , component ) . assemble ( ) ;
public class CompareRetinaApiImpl { /** * { @ inheritDoc } */ @ Override public Metric compare ( Model model1 , Model model2 ) throws JsonProcessingException , ApiException { } }
validateRequiredModels ( model1 , model2 ) ; LOG . debug ( "Compare models: model1: " + model1 . toJson ( ) + " model: " + model2 . toJson ( ) ) ; return compareApi . compare ( toJson ( model1 , model2 ) , this . retinaName ) ;
public class ArrayBufferInput { /** * Reset buffer . This method returns the old buffer . * @ param buf new buffer . This can be null to make this input empty . * @ return the old buffer . */ public MessageBuffer reset ( MessageBuffer buf ) { } }
MessageBuffer old = this . buffer ; this . buffer = buf ; if ( buf == null ) { isEmpty = true ; } else { isEmpty = false ; } return old ;
public class SoapFault { /** * Builder method from Spring WS SOAP fault object . * @ param fault * @ return */ public static SoapFault from ( org . springframework . ws . soap . SoapFault fault ) { } }
QNameEditor qNameEditor = new QNameEditor ( ) ; qNameEditor . setValue ( fault . getFaultCode ( ) ) ; SoapFault soapFault = new SoapFault ( ) . faultCode ( qNameEditor . getAsText ( ) ) . faultActor ( fault . getFaultActorOrRole ( ) ) . faultString ( fault . getFaultStringOrReason ( ) ) ; if ( fault . getFaultDetail ( ...
public class Yaml { /** * Loads the string representations into { @ link YamlNode } s . * @ param yaml the reader * @ return the { @ link YamlNode } s * @ see org . yaml . snakeyaml . Yaml # loadAll ( Reader ) */ public Stream < YamlNode > loadStream ( Reader yaml ) { } }
return StreamSupport . stream ( loadAll ( yaml ) . spliterator ( ) , false ) ;
public class JmsMessage { /** * Gets the JMS correlationId header . * @ return */ public String getCorrelationId ( ) { } }
Object correlationId = getHeader ( JmsMessageHeaders . CORRELATION_ID ) ; if ( correlationId != null ) { return correlationId . toString ( ) ; } return null ;
public class Try { /** * Try to execute supplied Runnable and will Catch specified Excpetions or java . lang . Exception * if none specified . * @ param cf CheckedRunnable to recover to execute * @ param classes Exception types to catch ( or java . lang . Exception if none specified ) * @ return New Try */ @ Sa...
Objects . requireNonNull ( cf ) ; try { cf . run ( ) ; return Try . success ( null ) ; } catch ( final Throwable t ) { if ( classes . length == 0 ) return Try . failure ( ( X ) t ) ; val error = Stream . of ( classes ) . filter ( c -> c . isAssignableFrom ( t . getClass ( ) ) ) . findFirst ( ) ; if ( error . isPresent ...
public class ApplicationMetadata { /** * returns mapped persistence unit . * @ param clazzName * clazz name . * @ return mapped persistence unit . */ public String getMappedPersistenceUnit ( String clazzName ) { } }
List < String > pus = clazzToPuMap . get ( clazzName ) ; final int _first = 0 ; String pu = null ; if ( pus != null && ! pus . isEmpty ( ) ) { if ( pus . size ( ) == 2 ) { onError ( clazzName ) ; } return pus . get ( _first ) ; } else { Set < String > mappedClasses = this . clazzToPuMap . keySet ( ) ; boolean found = f...
public class ChardevBackend { @ Nonnull public static ChardevBackend file ( @ Nonnull ChardevFile file ) { } }
ChardevBackend self = new ChardevBackend ( ) ; self . type = Discriminator . file ; self . file = file ; return self ;
public class FileGetFromComputeNodeOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has been modified since the specified time . * @ param ifModifiedSince the ifModifiedSince value to set * @ r...
if ( ifModifiedSince == null ) { this . ifModifiedSince = null ; } else { this . ifModifiedSince = new DateTimeRfc1123 ( ifModifiedSince ) ; } return this ;
public class HostXml_4 { /** * Add the operation to add the local host definition . */ private ModelNode addLocalHost ( final ModelNode address , final List < ModelNode > operationList , final String hostName ) { } }
String resolvedHost = hostName != null ? hostName : defaultHostControllerName ; // All further operations should modify the newly added host so the address passed in is updated . address . add ( HOST , resolvedHost ) ; // Add a step to setup the ManagementResourceRegistrations for the root host resource final ModelNode...
public class TileFactory { /** * Convert a pixel in the world bitmap at the specified zoom level into a GeoPosition * @ param pixelCoordinate a Point2D representing a pixel in the world bitmap * @ param zoom the zoom level of the world bitmap * @ return the converted GeoPosition */ public GeoPosition pixelToGeo (...
return GeoUtil . getPosition ( pixelCoordinate , zoom , getInfo ( ) ) ;
public class DefaultEncodingStateRegistry { /** * / * ( non - Javadoc ) * @ see EncodingStateRegistry # shouldEncodeWith ( Encoder , java . lang . CharSequence ) */ public boolean shouldEncodeWith ( Encoder encoderToApply , CharSequence string ) { } }
if ( isNoneEncoder ( encoderToApply ) ) return false ; EncodingState encodingState = getEncodingStateFor ( string ) ; return shouldEncodeWith ( encoderToApply , encodingState ) ;
public class RedisQuery { /** * ( non - Javadoc ) * @ see * com . impetus . kundera . query . QueryImpl # recursivelyPopulateEntities ( com . impetus * . kundera . metadata . model . EntityMetadata , * com . impetus . kundera . client . Client ) */ @ Override protected List < Object > recursivelyPopulateEntitie...
List < EnhanceEntity > ls = new ArrayList < EnhanceEntity > ( ) ; RedisQueryInterpreter interpreter = onTranslation ( getKunderaQuery ( ) . getFilterClauseQueue ( ) , m ) ; ls = ( ( RedisClient ) client ) . onExecuteQuery ( interpreter , m . getEntityClazz ( ) ) ; return setRelationEntities ( ls , client , m ) ;
public class SipManagerDelegate { /** * Remove the sip sessions and sip application sessions */ public void removeAllSessions ( ) { } }
List < SipSessionKey > sipSessionsToRemove = new ArrayList < SipSessionKey > ( ) ; for ( SipSessionKey sipSessionKey : sipSessions . keySet ( ) ) { sipSessionsToRemove . add ( sipSessionKey ) ; } for ( SipSessionKey sipSessionKey : sipSessionsToRemove ) { removeSipSession ( sipSessionKey ) ; } List < SipApplicationSess...
public class OlsonTimeZone { /** * / * ( non - Javadoc ) * @ see android . icu . util . BasicTimeZone # getNextTransition ( long , boolean ) */ @ Override public TimeZoneTransition getNextTransition ( long base , boolean inclusive ) { } }
initTransitionRules ( ) ; if ( finalZone != null ) { if ( inclusive && base == firstFinalTZTransition . getTime ( ) ) { return firstFinalTZTransition ; } else if ( base >= firstFinalTZTransition . getTime ( ) ) { if ( finalZone . useDaylightTime ( ) ) { // return finalZone . getNextTransition ( base , inclusive ) ; ret...
public class Iobeam { /** * Registers a device asynchronously with parameters of the provided { @ link Device } . This will * not block the calling thread . If successful , the device ID of this client will be set ( either * to the id provided , or if not provided , a randomly generated one ) . Any provided callbac...
RestCallback < Device > cb ; if ( callback == null ) { cb = RegisterCallback . getEmptyCallback ( ) . getInnerCallback ( this ) ; } else { cb = callback . getInnerCallback ( this ) ; } // If device ID is set and not explicitly asking for a different one , return current ID . boolean alreadySet = this . deviceId != null...
public class ClassReader { /** * If name is an array type or class signature , return the * corresponding type ; otherwise return a ClassSymbol with given name . */ Object readClassOrType ( int i ) { } }
int index = poolIdx [ i ] ; int len = getChar ( index + 1 ) ; int start = index + 3 ; Assert . check ( buf [ start ] == '[' || buf [ start + len - 1 ] != ';' ) ; // by the above assertion , the following test can be // simplified to ( buf [ start ] = = ' [ ' ) return ( buf [ start ] == '[' || buf [ start + len - 1 ] ==...
public class ClassUtils { /** * < p > Converts the specified array of primitive Class objects to an array of * its corresponding wrapper Class objects . < / p > * @ param classes the class array to convert , may be null or empty * @ return an array which contains for each given class , the wrapper class or * th...
if ( classes == null ) { return null ; } if ( classes . length == 0 ) { return classes ; } final Class < ? > [ ] convertedClasses = new Class [ classes . length ] ; for ( int i = 0 ; i < classes . length ; i ++ ) { convertedClasses [ i ] = primitiveToWrapper ( classes [ i ] ) ; } return convertedClasses ;
public class FileOutputFormat { /** * Helper function to create the task ' s temporary output directory and * return the path to the task ' s output file . * @ param conf job - configuration * @ param name temporary task - output filename * @ return path to the task ' s temporary output file * @ throws IOExce...
// $ { mapred . out . dir } Path outputPath = getOutputPath ( conf ) ; if ( outputPath == null ) { throw new IOException ( "Undefined job output-path" ) ; } OutputCommitter committer = conf . getOutputCommitter ( ) ; Path workPath = outputPath ; TaskAttemptContext context = new TaskAttemptContext ( conf , TaskAttemptID...
public class ImageryMetaDataResource { /** * Parse a JSON string containing resource field of a ImageryMetaData response * @ param a _ jsonObjectthe JSON content string * @ returnImageryMetaDataResource object containing parsed information * @ throws Exception */ static public ImageryMetaDataResource getInstanceF...
final ImageryMetaDataResource result = new ImageryMetaDataResource ( ) ; if ( a_jsonObject == null ) { throw new Exception ( "JSON to parse is null" ) ; } result . copyright = parent . getString ( COPYRIGHT ) ; if ( a_jsonObject . has ( IMAGE_HEIGHT ) ) { result . m_imageHeight = a_jsonObject . getInt ( IMAGE_HEIGHT ) ...
public class CmsSetupStep03Database { /** * Switches DB type . * @ param dbName the database type * @ param webapp the webapp name */ private void updateDb ( String dbName , String webapp ) { } }
m_mainLayout . removeAllComponents ( ) ; m_setupBean . setDatabase ( dbName ) ; CmsDbSettingsPanel panel = new CmsDbSettingsPanel ( m_setupBean ) ; m_panel [ 0 ] = panel ; panel . initFromSetupBean ( webapp ) ; m_mainLayout . addComponent ( panel ) ;
public class PageFlowUtils { /** * Add a property - related message that will be shown with the Errors and Error tags . * @ param request the current ServletRequest . * @ param propertyName the name of the property with which to associate this error . * @ param messageKey the message - resources key for the messa...
InternalUtils . addActionError ( propertyName , new ActionMessage ( messageKey , null ) , request ) ;
public class AttributeCriterionPane { private void buildUI ( ) { } }
// Attribute select : attributeSelect = new SelectItem ( "attributeItem" ) ; attributeSelect . setWidth ( 140 ) ; attributeSelect . setShowTitle ( false ) ; attributeSelect . setValueMap ( org . geomajas . gwt . client . widget . attribute . AttributeCriterionPane . getSearchableAttributes ( layer ) ) ; attributeSelect...
public class VersionHistoryImpl { /** * { @ inheritDoc } */ public String [ ] getVersionLabels ( Version version ) throws VersionException , RepositoryException { } }
checkValid ( ) ; List < String > vlabels = getVersionLabelsList ( version ) ; String [ ] res = new String [ vlabels . size ( ) ] ; for ( int i = 0 ; i < vlabels . size ( ) ; i ++ ) { res [ i ] = vlabels . get ( i ) ; } return res ;
public class BigDecimalUtil { /** * true if ABS ( ( startValue - newValue ) / startValue ) & lt ; = abs ( thresholdPercent ) * @ param startValue * @ param newValue * @ param thresholdPercent * @ return */ public static boolean movedInsideThresholdPercentage ( final BigDecimal startValue , final BigDecimal newV...
return ! movedStrictlyOutsideThresholdPercentage ( startValue , newValue , thresholdPercent ) ;
public class PluginManager { /** * Gets a static resource from a plugin * @ param pluginName - Name of the plugin ( defined in the plugin manifest ) * @ param fileName - Filename to fetch * @ return byte array of the resource * @ throws Exception exception */ public byte [ ] getResource ( String pluginName , St...
// TODO : This is going to be slow . . future improvement is to cache the data instead of searching all jars for ( String jarFilename : jarInformation ) { JarFile jarFile = new JarFile ( new File ( jarFilename ) ) ; Enumeration < ? > enumer = jarFile . entries ( ) ; // Use the Plugin - Name manifest entry to match with...
public class ResourcesInner { /** * Creates a resource . * @ param resourceGroupName The name of the resource group for the resource . The name is case insensitive . * @ param resourceProviderNamespace The namespace of the resource provider . * @ param parentResourcePath The parent resource identity . * @ param...
return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , resourceProviderNamespace , parentResourcePath , resourceType , resourceName , apiVersion , parameters ) , serviceCallback ) ;
public class Single { /** * Runs the current Single and if it doesn ' t signal within the specified timeout window , it is * disposed and the other SingleSource subscribed to . * < dl > * < dt > < b > Scheduler : < / b > < / dt > * < dd > { @ code timeout } subscribes to the other SingleSource on the { @ link S...
ObjectHelper . requireNonNull ( other , "other is null" ) ; return timeout0 ( timeout , unit , scheduler , other ) ;
public class IceAgent { /** * Attempts to select a candidate pair on a ICE component . < br > * A candidate pair is only selected if the local candidate channel is * registered with the provided Selection Key . * @ param component * The component that holds the gathered candidates . * @ param key * The key ...
for ( LocalCandidateWrapper localCandidate : component . getLocalCandidates ( ) ) { if ( channel . equals ( localCandidate . getChannel ( ) ) ) { return component . setCandidatePair ( channel ) ; } } return null ;
public class AbstractResultSetWrapper { /** * { @ inheritDoc } * @ see java . sql . ResultSet # updateLong ( java . lang . String , long ) */ @ Override public void updateLong ( final String columnLabel , final long x ) throws SQLException { } }
wrapped . updateLong ( columnLabel , x ) ;
public class AnnisServiceRunner { /** * Creates and starts the server * @ param rethrowExceptions Set to true if you want to get exceptions * re - thrown to parent */ public void start ( boolean rethrowExceptions ) throws Exception { } }
log . info ( "Starting up REST..." ) ; try { createWebServer ( ) ; if ( server == null ) { isShutdownRequested = true ; errorCode = 100 ; } else { server . start ( ) ; } } catch ( Exception ex ) { log . error ( "could not start ANNIS REST service" , ex ) ; isShutdownRequested = true ; errorCode = 100 ; if ( rethrowExce...
public class YearQuarter { /** * Obtains the current year - quarter from the specified clock . * This will query the specified clock to obtain the current year - quarter . * Using this method allows the use of an alternate clock for testing . * The alternate clock may be introduced using { @ link Clock dependency...
final LocalDate now = LocalDate . now ( clock ) ; // called once return YearQuarter . of ( now . getYear ( ) , Quarter . from ( now . getMonth ( ) ) ) ;
public class DateParamTagSupport { /** * Private utility methods */ private void convertValue ( ) throws JspException { } }
if ( ( type == null ) || ( type . equalsIgnoreCase ( TIMESTAMP_TYPE ) ) ) { if ( ! ( value instanceof java . sql . Timestamp ) ) { value = new java . sql . Timestamp ( value . getTime ( ) ) ; } } else if ( type . equalsIgnoreCase ( TIME_TYPE ) ) { if ( ! ( value instanceof java . sql . Time ) ) { value = new java . sql...
public class VirtualMachinesInner { /** * The operation to get all extensions of a Virtual Machine . * @ param resourceGroupName The name of the resource group . * @ param vmName The name of the virtual machine containing the extension . * @ throws IllegalArgumentException thrown if parameters fail the validation...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( vmName == null ) { throw new IllegalArgumentException ( "Parameter vmName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new ...
public class KeyStore { /** * Returns a keystore object of the specified type . * < p > A new KeyStore object encapsulating the * KeyStoreSpi implementation from the specified provider * is returned . The specified provider must be registered * in the security provider list . * < p > Note that the list of reg...
if ( provider == null || provider . length ( ) == 0 ) throw new IllegalArgumentException ( "missing provider" ) ; try { Object [ ] objs = Security . getImpl ( type , "KeyStore" , provider ) ; return new KeyStore ( ( KeyStoreSpi ) objs [ 0 ] , ( Provider ) objs [ 1 ] , type ) ; } catch ( NoSuchAlgorithmException nsae ) ...
public class NamespaceHeaderParser { /** * Parses the namespace { @ link File } into a { @ link NamespaceHeader } object . * @ param namespaceFile { @ link File } , the namespace file , which cannot be * null , must exist , and must be readable * @ return { @ link NamespaceHeader } , the parsed namespace header ...
if ( namespaceFile == null ) { throw new InvalidArgument ( "namespaceFile" , namespaceFile ) ; } if ( ! namespaceFile . exists ( ) ) { throw new InvalidArgument ( "namespaceFile does not exist" ) ; } if ( ! namespaceFile . canRead ( ) ) { throw new InvalidArgument ( "namespaceFile cannot be read" ) ; } Map < String , P...
public class CustomScanDialog { /** * Use the save method to launch a scan */ @ Override public void save ( ) { } }
List < Object > contextSpecificObjects = new ArrayList < Object > ( ) ; techTreeState = getTechTree ( ) . getTechSet ( ) ; if ( ! this . getBoolValue ( FIELD_ADVANCED ) ) { contextSpecificObjects . add ( scanPolicy ) ; } else { contextSpecificObjects . add ( policyPanel . getScanPolicy ( ) ) ; if ( target == null && th...
public class JobLifecycleListenersList { /** * { @ inheritDoc } */ @ Override public void registerJobLifecycleListener ( JobLifecycleListener listener ) { } }
_dispatcher . addListener ( listener ) ; _jobCatalogDelegate . addListener ( listener ) ; _jobSchedulerDelegate . registerJobSpecSchedulerListener ( listener ) ;
public class DateUtils { /** * Returns the days between two dates . Positive values indicate that the * second date is after the first , and negative values indicate , well , the * opposite . Relying on specific times is problematic . * @ param early * the " first date " * @ param late * the " second date "...
java . util . GregorianCalendar calst = new java . util . GregorianCalendar ( ) ; java . util . GregorianCalendar caled = new java . util . GregorianCalendar ( ) ; calst . setTime ( early ) ; caled . setTime ( late ) ; // 设置时间为0时 calst . set ( java . util . GregorianCalendar . HOUR_OF_DAY , 0 ) ; calst . set ( java . u...
public class CIMsgPhrase { /** * Get the type this Configuration item represents . * @ return Type */ public MsgPhrase getMsgPhrase ( ) { } }
MsgPhrase ret = null ; try { ret = MsgPhrase . get ( this . uuid ) ; } catch ( final EFapsException e ) { LOG . error ( "Error on retrieving MsgPhrase for CIMsgPhrase with uuid: {}" , this . uuid ) ; } return ret ;
public class XOManagerImpl { /** * Find entities according to the given example entity . * @ param type * The entity type . * @ param entity * The example entity . * @ param < T > * The entity type . * @ return A { @ link ResultIterable } . */ private < T > ResultIterable < T > findByExample ( Class < ? >...
sessionContext . getCacheSynchronizationService ( ) . flush ( ) ; EntityTypeMetadata < EntityMetadata > entityTypeMetadata = sessionContext . getMetadataProvider ( ) . getEntityMetadata ( type ) ; EntityDiscriminator entityDiscriminator = entityTypeMetadata . getDatastoreMetadata ( ) . getDiscriminator ( ) ; if ( entit...
public class NormalizeUtils { /** * Produces a hash for the paths of adjacent bnodes for a bnode , * incorporating all information about its subgraph of bnodes . This method * will recursively pick adjacent bnode permutations that produce the * lexicographically - least ' path ' serializations . * @ param id ...
try { // create SHA - 1 digest final MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; final Map < String , List < String > > groups = new LinkedHashMap < String , List < String > > ( ) ; List < String > groupHashes ; final List < Object > quads = ( List < Object > ) ( ( Map < String , Object > ) bnodes . ge...
public class CmsPropertyChange { /** * Builds the html for the result list of resources where the property was changed . < p > * @ return the html for the result list */ public String buildResultList ( ) { } }
StringBuffer result = new StringBuffer ( 16 ) ; if ( ( getChangedResources ( ) != null ) && ( getChangedResources ( ) . size ( ) > 0 ) ) { // at least one resource property value has been changed , show list for ( int i = 0 ; i < getChangedResources ( ) . size ( ) ; i ++ ) { CmsResource res = ( CmsResource ) getChanged...
public class ResolvableType { /** * Return an array of { @ link ResolvableType } s representing the generic parameters of * this type . If no generics are available an empty array is returned . If you need to * access a specific generic consider using the { @ link # getGeneric ( int . . . ) } method as * it allow...
if ( this == NONE ) { return EMPTY_TYPES_ARRAY ; } if ( this . generics == null ) { if ( this . type instanceof Class ) { Class < ? > typeClass = ( Class < ? > ) this . type ; this . generics = forTypes ( SerializableTypeWrapper . forTypeParameters ( typeClass ) , this . variableResolver ) ; } else if ( this . type ins...
public class MessageItem { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . SIMPMessage # getGuaranteedStreamUuid ( ) */ @ Override public SIBUuid12 getGuaranteedStreamUuid ( ) { } }
if ( ! guaranteedStreamUuidSet ) { JsMessage localMsg = getJSMessage ( true ) ; guaranteedStreamUuidSet = true ; guaranteedStreamUuid = localMsg . getGuaranteedStreamUUID ( ) ; } return guaranteedStreamUuid ;
public class WebSiteManagementClientImpl { /** * Updates source control token . * Updates source control token . * @ param sourceControlType Type of source control * @ param requestMessage Source control token information * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return ...
return updateSourceControlWithServiceResponseAsync ( sourceControlType , requestMessage ) . map ( new Func1 < ServiceResponse < SourceControlInner > , SourceControlInner > ( ) { @ Override public SourceControlInner call ( ServiceResponse < SourceControlInner > response ) { return response . body ( ) ; } } ) ;
public class ClientNotificationArea { /** * Remove all the client notifications */ public synchronized void remoteClientRegistrations ( RESTRequest request ) { } }
Iterator < Entry < NotificationTargetInformation , ClientNotificationListener > > clientListeners = listeners . entrySet ( ) . iterator ( ) ; try { while ( clientListeners . hasNext ( ) ) { Entry < NotificationTargetInformation , ClientNotificationListener > clientListener = clientListeners . next ( ) ; NotificationTar...
public class LocLogger { /** * Log a localized message at the ERROR level . * @ param key * the key used for localization * @ param args * optional arguments */ public void error ( Enum < ? > key , Object ... args ) { } }
if ( ! logger . isErrorEnabled ( ) ) { return ; } String translatedMsg = imc . getMessage ( key , args ) ; MessageParameterObj mpo = new MessageParameterObj ( key , args ) ; if ( instanceofLAL ) { ( ( LocationAwareLogger ) logger ) . log ( LOCALIZED , FQCN , LocationAwareLogger . ERROR_INT , translatedMsg , args , null...
public class JPAEntity { /** * Finds a JPA entity by its primary key . * @ param < E > The JPA entity type . * @ param em The entity manager to use . Cannot be null . * @ param id The ID of the entity to find . Must be a positive , non - zero integer . * @ param type The runtime type to cast the result value to...
requireArgument ( em != null , "The entity manager cannot be null." ) ; requireArgument ( id != null && id . compareTo ( ZERO ) > 0 , "ID cannot be null and must be positive and non-zero" ) ; requireArgument ( type != null , "The entity type cannot be null." ) ; TypedQuery < E > query = em . createNamedQuery ( "JPAEnti...
public class HBaseQueueAdmin { /** * Returns the column qualifier for the consumer state column . The qualifier is formed by * { @ code < groupId > < instanceId > } . * @ param groupId Group ID of the consumer * @ param instanceId Instance ID of the consumer * @ return A new byte [ ] which is the column qualifi...
byte [ ] column = new byte [ Longs . BYTES + Ints . BYTES ] ; Bytes . putLong ( column , 0 , groupId ) ; Bytes . putInt ( column , Longs . BYTES , instanceId ) ; return column ;
public class DeleteAppRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteAppRequest deleteAppRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteAppRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteAppRequest . getAppId ( ) , APPID_BINDING ) ; protocolMarshaller . marshall ( deleteAppRequest . getForceStopAppReplication ( ) , FORCESTOPAPPREPLICATION_BINDING ...