signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PrimitiveByteArray2dJsonSerializer { /** * { @ inheritDoc } */
@ Override public void doSerialize ( JsonWriter writer , byte [ ] [ ] values , JsonSerializationContext ctx , JsonSerializerParameters params ) { } } | if ( ! ctx . isWriteEmptyJsonArrays ( ) && values . length == 0 ) { writer . cancelName ( ) ; return ; } writer . beginArray ( ) ; for ( byte [ ] array : values ) { writer . unescapeValue ( Base64Utils . toBase64 ( array ) ) ; } writer . endArray ( ) ; |
public class UpdatableResultSet { /** * { inheritDoc } . */
public void updateBigDecimal ( int columnIndex , BigDecimal value ) throws SQLException { } } | checkUpdatable ( columnIndex ) ; if ( value == null ) { parameterHolders [ columnIndex - 1 ] = new NullParameter ( ColumnType . DECIMAL ) ; return ; } parameterHolders [ columnIndex - 1 ] = new BigDecimalParameter ( value ) ; |
public class WebJBossASClient { /** * Add a new web connector , which may be a secure SSL connector ( HTTPS ) or not ( HTTP ) .
* @ param name name of new connector to add
* @ param connectorConfig the connector ' s configuration
* @ throws Exception any error */
public void addConnector ( String name , Connector... | ModelNode fullRequest ; final Address connectorAddress = Address . root ( ) . add ( SUBSYSTEM , SUBSYSTEM_WEB , CONNECTOR , name ) ; final ModelNode connectorRequest = createRequest ( ADD , connectorAddress ) ; setPossibleExpression ( connectorRequest , "executor" , connectorConfig . getExecutor ( ) ) ; setPossibleExpr... |
public class Histogram { /** * Create a plot canvas with the histogram plot of given data .
* @ param id the id of the plot .
* @ param data a sample set .
* @ param breaks an array of size k + 1 giving the breakpoints between
* histogram cells . Must be in ascending order . */
public static PlotCanvas plot ( S... | return plot ( id , data , breaks , true ) ; |
public class Utils { /** * Convert a type reference to a lightweight type reference .
* @ param typeRef - reference to convert .
* @ param services - services used for the conversion
* @ return the lightweight type reference . */
public static LightweightTypeReference toLightweightTypeReference ( JvmTypeReference... | return toLightweightTypeReference ( typeRef , services , false ) ; |
public class JobKeyConverter { /** * Handles splitting the encoded job key correctly , accounting for long
* encoding of the run ID . Since the long encoding of the run ID may
* legitimately contain the separator bytes , we first split the leading 3
* elements ( cluster ! user ! appId ) , then split out the runId... | byte [ ] [ ] splits = ByteUtil . split ( rawKey , Constants . SEP_BYTES , 4 ) ; /* final components ( runId ! jobId ! additional ) need to be split separately for correct
* handling of runId long encoding */
if ( splits . length == 4 ) { // TODO : this splitting is getting really ugly , look at using Orderly instead ... |
public class AipFace { /** * 人脸删除接口
* @ param userId - 用户id ( 由数字 、 字母 、 下划线组成 ) , 长度限制128B
* @ param groupId - 用户组id ( 由数字 、 字母 、 下划线组成 ) , 长度限制128B
* @ param faceToken - 需要删除的人脸图片token , ( 由数字 、 字母 、 下划线组成 ) 长度限制64B
* @ param options - 可选参数对象 , key : value都为string类型
* options - options列表 :
* @ return JSON... | AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; request . addBody ( "user_id" , userId ) ; request . addBody ( "group_id" , groupId ) ; request . addBody ( "face_token" , faceToken ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( FaceConsts . FACE_DELETE ) ; request... |
public class User { /** * Checks if a user has entered the correct password .
* Compares password hashes .
* @ param u a user with a set password
* @ return true if password matches the one in the data store */
public static final boolean passwordMatches ( User u ) { } } | if ( u == null ) { return false ; } String password = u . getPassword ( ) ; String identifier = u . getIdentifier ( ) ; if ( StringUtils . isBlank ( password ) || StringUtils . isBlank ( identifier ) ) { return false ; } ParaObject s = CoreUtils . getInstance ( ) . getDao ( ) . read ( u . getAppid ( ) , identifier ) ; ... |
public class SnowballAnalyzerBuilder { /** * Returns the snowball { @ link Analyzer } for the specified language and stopwords .
* @ param language The language code . The supported languages are English , French , Spanish , Portuguese , Italian ,
* Romanian , German , Dutch , Swedish , Norwegian , Danish , Russian... | return new Analyzer ( ) { protected TokenStreamComponents createComponents ( String field , Reader reader ) { final Tokenizer source = new StandardTokenizer ( reader ) ; TokenStream result = new StandardFilter ( source ) ; result = new LowerCaseFilter ( result ) ; result = new StopFilter ( result , stopwords ) ; result... |
public class Matrix4x3f { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix4x3fc # transformDirection ( org . joml . Vector3fc , org . joml . Vector3f ) */
public Vector3f transformDirection ( Vector3fc v , Vector3f dest ) { } } | dest . set ( m00 * v . x ( ) + m10 * v . y ( ) + m20 * v . z ( ) , m01 * v . x ( ) + m11 * v . y ( ) + m21 * v . z ( ) , m02 * v . x ( ) + m12 * v . y ( ) + m22 * v . z ( ) ) ; return dest ; |
public class Configuration { /** * Returns the value associated with the given key as a byte array .
* @ param key
* The key pointing to the associated value .
* @ param defaultValue
* The default value which is returned in case there is no value associated with the given key .
* @ return the ( default ) valu... | String encoded = getStringInternal ( key ) ; if ( encoded == null ) { return defaultValue ; } else { return Base64 . decodeBase64 ( encoded . getBytes ( ) ) ; } |
public class PanelGridRenderer { /** * Extract the option row classes from the JSF file .
* @ return null or a String array . */
protected String [ ] getRowClasses ( PanelGrid grid ) { } } | String rowClasses = grid . getRowClasses ( ) ; if ( null == rowClasses || rowClasses . trim ( ) . length ( ) == 0 ) return null ; String [ ] rows = rowClasses . split ( "," ) ; return rows ; |
public class StringGrabber { /** * remove consecutive chars placed at the head
* @ param charToRemove */
public StringGrabber removeHeadConsecutiveChars ( char charToRemove ) { } } | boolean loop = true ; if ( sb . length ( ) > 0 ) { while ( loop ) { if ( sb . charAt ( 0 ) == charToRemove ) { removeHead ( 1 ) ; } else { loop = false ; } } } return StringGrabber . this ; |
public class Utils { /** * Strips all symbols , punctuation , whitespace and control chars from a string .
* @ param str a dirty string
* @ param replaceWith a string to replace spaces with
* @ return a clean string */
public static String stripAndTrim ( String str , String replaceWith ) { } } | return stripAndTrim ( str , replaceWith , false ) ; |
public class Watcher { /** * Add a new File that the thread should start watching . If the file does not exist nothing happens ( this may be
* because a class has been generated on the fly and really there is nothing to watch on disk ) .
* @ param fileToWatch the new file to watch
* @ return true if the file is n... | if ( ! fileToWatch . exists ( ) ) { return false ; } synchronized ( this ) { if ( GlobalConfiguration . verboseMode && log . isLoggable ( Level . INFO ) ) { log . info ( "Now watching " + fileToWatch ) ; } int insertionPos = findPosition ( fileToWatch ) ; if ( insertionPos == - 1 ) { watchListFiles . add ( fileToWatch ... |
public class ClassPathUtils { /** * Returns the fully qualified path for the resource with name { @ code resourceName } relative to the given context .
* < p > Note that this method does not check whether the resource actually exists .
* It only constructs the path .
* Null inputs are not allowed . < / p >
* < ... | Validate . notNull ( context , "Parameter '%s' must not be null!" , "context" ) ; Validate . notNull ( resourceName , "Parameter '%s' must not be null!" , "resourceName" ) ; return context . getName ( ) . replace ( '.' , '/' ) + "/" + resourceName ; |
public class SerializerRegistry { /** * Registers the given class as an abstract serializer for the given abstract type .
* @ param abstractType The abstract type for which to register the serializer .
* @ param id The serializable type ID .
* @ param factory The serializer factory .
* @ return The serializer r... | abstractFactories . put ( abstractType , factory ) ; types . put ( id , abstractType ) ; ids . put ( abstractType , id ) ; return this ; |
public class IndexTermReader { /** * Update the target name of constructed IndexTerm recursively */
private void updateIndexTermTargetName ( ) { } } | if ( defaultTitle == null ) { defaultTitle = targetFile ; } for ( final IndexTerm indexterm : indexTermList ) { updateIndexTermTargetName ( indexterm ) ; } |
public class Client { /** * Get a user ' s activity feed . Returned as a query to ease paging .
* @ param userId
* @ return */
public Query queryActivityFeedForUser ( String userId ) { } } | Query q = queryEntitiesRequest ( HttpMethod . GET , null , null , organizationId , applicationId , "users" , userId , "feed" ) ; return q ; |
public class Configuration { /** * Scans the { @ link ClassLoader } hierarchy to check if there is a
* < code > . . . / classes < / code > entry present . This is designed to prevent
* uncertainty and frustration if you have correctly configured class
* reloading , but have also accidentally included your classes... | // Check for a " classes " URL :
for ( URL url : urlClassLoader . getURLs ( ) ) { String urlPath = StringUtils . lowerCase ( url . getPath ( ) ) ; if ( StringUtils . endsWithAny ( urlPath , "/classes" , "/classes/" ) ) { classesInClasspath = url ; } } |
public class ClonesApi { /** * Get clones A list of the character & # 39 ; s clones - - - This route is cached
* for up to 120 seconds SSO Scope : esi - clones . read _ clones . v1
* @ param characterId
* An EVE character ID ( required )
* @ param datasource
* The server name you would like data from ( option... | ApiResponse < CharacterClonesResponse > resp = getCharactersCharacterIdClonesWithHttpInfo ( characterId , datasource , ifNoneMatch , token ) ; return resp . getData ( ) ; |
public class SessionContext { /** * create the store */
public IStore createStore ( SessionManagerConfig smc , String smid , ServletContext sc , boolean applicationSessionStore , boolean removeAttrOnInvalidate ) { } } | IStore store = null ; MemoryStoreHelper storeHelper = this . createStoreHelper ( sc ) ; SessionStoreService service = this . sessionStoreService ; if ( service != null ) { store = service . createStore ( smc , smid , sc , storeHelper , _sap . getAppClassLoader ( ) , applicationSessionStore ) ; } if ( store == null ) { ... |
public class ExceptionFactory { /** * Returns an AssertionError that describes the fact that the arguments of an invocation are different .
* If { @ link org . opentest4j . AssertionFailedError } is on the class path ( used by JUnit 5 and others ) ,
* it returns a class that extends it . Otherwise , if { @ link jun... | return factory . create ( message , wanted , actual ) ; |
public class Server { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . map . api . MAPDialogListener # onDialogTimeout
* ( org . restcomm . protocols . ss7 . map . api . MAPDialog ) */
@ Override public void onDialogTimeout ( MAPDialog mapDialog ) { } } | logger . error ( String . format ( "onDialogTimeout for DialogId=%d" , mapDialog . getLocalDialogId ( ) ) ) ; |
public class ListInstancesRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ListInstancesRequest listInstancesRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( listInstancesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listInstancesRequest . getClusterId ( ) , CLUSTERID_BINDING ) ; protocolMarshaller . marshall ( listInstancesRequest . getInstanceGroupId ( ) , INSTANCEGROUPID_BIND... |
public class BitsUtil { /** * Find the next set bit .
* @ param v Value to process
* @ param start Start position ( inclusive )
* @ return Position of next set bit , or - 1. */
public static int nextSetBit ( long v , int start ) { } } | if ( start >= Long . SIZE ) { return - 1 ; } start = start < 0 ? 0 : start ; long cur = v & ( LONG_ALL_BITS << start ) ; return cur == 0 ? - 1 : cur == LONG_ALL_BITS ? 0 : Long . numberOfTrailingZeros ( cur ) ; |
public class EventManager { /** * This method is called to alert project listeners to the fact that
* a task has been written to a project file .
* @ param task task instance */
public void fireTaskWrittenEvent ( Task task ) { } } | if ( m_projectListeners != null ) { for ( ProjectListener listener : m_projectListeners ) { listener . taskWritten ( task ) ; } } |
public class RouteMatcher { /** * Specify a handler that will be called for a matching HTTP PUT
* @ param regex A regular expression
* @ param handler The handler to call */
public RouteMatcher putWithRegEx ( String regex , Handler < HttpServerRequest > handler ) { } } | addRegEx ( regex , handler , putBindings ) ; return this ; |
public class FeatureRepository { /** * Change the active list of installed features
* @ param newInstalledFeatures new set of installed features . Replaces the previous set . */
public void setInstalledFeatures ( Set < String > newInstalledFeatures , Set < String > newConfiguredFeatures , boolean configurationError )... | Set < String > current = installedFeatures ; if ( ! current . equals ( newInstalledFeatures ) ) { isDirty = true ; } if ( newInstalledFeatures . isEmpty ( ) ) installedFeatures = Collections . emptySet ( ) ; else installedFeatures = Collections . unmodifiableSet ( new HashSet < String > ( newInstalledFeatures ) ) ; cur... |
public class JoinableResourceBundleImpl { /** * ( non - Javadoc )
* @ see
* net . jawr . web . resource . bundle . JoinableResourceBundle # getURLPrefix ( java
* . util . Map ) */
@ Override public String getURLPrefix ( Map < String , String > variants ) { } } | if ( null == this . urlPrefix ) throw new IllegalStateException ( "The bundleDataHashCode must be set before accessing the url prefix." ) ; if ( variants != null && ! variants . isEmpty ( ) ) { String key = getAvailableVariant ( variants ) ; if ( StringUtils . isNotEmpty ( key ) ) { return prefixMap . get ( key ) + "."... |
public class QrCodeBinaryGridReader { /** * Converts a pixel coordinate into a grid coordinate . */
public void imageToGrid ( Point2D_F64 pixel , Point2D_F64 grid ) { } } | transformGrid . imageToGrid ( pixel . x , pixel . y , grid ) ; |
public class Jenkins { /** * This method checks all existing jobs to see if displayName is
* unique . It does not check the displayName against the displayName of the
* job that the user is configuring though to prevent a validation warning
* if the user sets the displayName to what it currently is .
* @ param ... | Collection < TopLevelItem > itemCollection = items . values ( ) ; // if there are a lot of projects , we ' ll have to store their
// display names in a HashSet or something for a quick check
for ( TopLevelItem item : itemCollection ) { if ( item . getName ( ) . equals ( currentJobName ) ) { // we won ' t compare the ca... |
public class A_CmsXmlContentValue { /** * Returns the relation type for the given path . < p >
* @ param path the element path
* @ return the relation type */
protected CmsRelationType getRelationType ( String path ) { } } | CmsRelationType result = getContentDefinition ( ) . getContentHandler ( ) . getRelationType ( path ) ; I_CmsXmlDocument document = getDocument ( ) ; if ( document != null ) { // the relations set in the main content definition override relations set in the nested definition
result = document . getContentDefinition ( ) ... |
public class CdsTranslator { /** * returns an ExtendedValidationResult
* @ param cds
* @ param entry
* @ return */
public ExtendedResult < TranslationResult > translate ( CdsFeature cds , Entry entry ) throws RepositoryException { } } | ExtendedResult < TranslationResult > validationResult = new ExtendedResult < TranslationResult > ( ) ; if ( cds == null || cds . getLocations ( ) == null ) return validationResult ; if ( ( Entry . CON_DATACLASS . equals ( entry . getDataClass ( ) ) && ( entry . getSequence ( ) == null || entry . getSequence ( ) . getSe... |
public class ProgressBar { /** * Wraps an { @ link InputStream } so that when read , a progress bar is shown to track the reading progress .
* For this function the progress bar can be fully customized by using a { @ link ProgressBarBuilder } .
* @ param is Input stream to be wrapped
* @ param pbb An instance of ... | long size = Util . getInputStreamSize ( is ) ; if ( size != - 1 ) pbb . setInitialMax ( size ) ; return new ProgressBarWrappedInputStream ( is , pbb . build ( ) ) ; |
public class WildcardMatcher { /** * Matches path to at least one pattern . Returns index of matched pattern or < code > - 1 < / code > otherwise .
* @ see # matchPath ( String , String , char ) */
public static int matchPathOne ( String platformDependentPath , String ... patterns ) { } } | for ( int i = 0 ; i < patterns . length ; i ++ ) { if ( matchPath ( platformDependentPath , patterns [ i ] ) ) { return i ; } } return - 1 ; |
public class CollectionExtensions { /** * The operator mapping from { @ code - = } to { @ link # removeAll ( Collection , Collection ) } . Returns < code > true < / code > if the
* collection changed due to this operation .
* @ param collection
* the to - be - changed collection . May not be < code > null < / cod... | return removeAll ( collection , newElements ) ; |
public class policyexpression { /** * Use this API to fetch filtered set of policyexpression resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static policyexpression [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | policyexpression obj = new policyexpression ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; policyexpression [ ] response = ( policyexpression [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class PathAlterationObserver { /** * Fire directory / file change events to the registered listeners .
* @ param entry The previous file system entry
* @ param path The current file */
private void doMatch ( final FileStatusEntry entry , final Path path ) throws IOException { } } | if ( entry . refresh ( path ) ) { for ( final PathAlterationListener listener : listeners . values ( ) ) { if ( entry . isDirectory ( ) ) { listener . onDirectoryChange ( path ) ; } else { listener . onFileChange ( path ) ; } } } |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EEnum getIfcElectricDistributionBoardTypeEnum ( ) { } } | if ( ifcElectricDistributionBoardTypeEnumEEnum == null ) { ifcElectricDistributionBoardTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 975 ) ; } return ifcElectricDistributionBoardTypeEnumEEnum ; |
public class FileUploadFilter { /** * Examines the request content type , and if it is a
* { @ code multipart / * } request , wraps the request with a
* { @ code HttpFileUploadRequest } .
* @ param pRequest The servlet request
* @ param pResponse The servlet response
* @ param pChain The filter chain
* @ th... | HttpServletRequest request = ( HttpServletRequest ) pRequest ; // Get the content type from the request
String contentType = request . getContentType ( ) ; // If the content type is multipart , wrap
if ( isMultipartFileUpload ( contentType ) ) { pRequest = new HttpFileUploadRequestWrapper ( request , uploadDir , maxFil... |
public class Polygon { /** * default behaviour when no click listener is set */
public boolean onClickDefault ( Polygon polygon , MapView mapView , GeoPoint eventPos ) { } } | polygon . setInfoWindowLocation ( eventPos ) ; polygon . showInfoWindow ( ) ; return true ; |
public class nslicense { /** * Use this API to fetch all the nslicense resources that are configured on netscaler . */
public static nslicense get ( nitro_service service ) throws Exception { } } | nslicense obj = new nslicense ( ) ; nslicense [ ] response = ( nslicense [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; |
public class CDIArchiveImpl { /** * { @ inheritDoc }
* @ throws CDIException */
@ Override public String getPath ( ) throws CDIException { } } | if ( this . path == null ) { try { Entry entry = getContainer ( ) . adapt ( Entry . class ) ; path = "" ; while ( entry != null ) { path = entry . getPath ( ) + path ; entry = entry . getRoot ( ) . adapt ( Entry . class ) ; } } catch ( UnableToAdaptException e ) { throw new CDIException ( e ) ; } } return path ; |
public class FuchsiaGogoCommand { /** * - - - - - EXPORTER */
@ Descriptor ( "Gets the exporter available in the platform" ) public void exporter ( @ Descriptor ( "exporter [exporter name]" ) String ... parameters ) { } } | Map < ServiceReference , ExporterService > exporterRefsAndServices = getAllServiceRefsAndServices ( ExporterService . class ) ; StringBuilder sbFinal = new StringBuilder ( ) ; if ( exporterRefsAndServices . isEmpty ( ) ) { print ( "No exporter available." ) ; } else { for ( Map . Entry < ServiceReference , ExporterServ... |
public class RailsNamingStrategy { /** * 数据列的逻辑名
* < pre >
* 如果有列名 , 不做处理 , 否则按照属性自动起名 .
* 该策略保证columnName = logicalColumnName
* < / pre > */
public String logicalColumnName ( String columnName , String propertyName ) { } } | return Strings . isNotEmpty ( columnName ) ? columnName : propertyToColumnName ( propertyName ) ; |
public class Parser { /** * 12.14 Try Statement */
private ParseTree parseTryStatement ( ) { } } | SourcePosition start = getTreeStartLocation ( ) ; eat ( TokenType . TRY ) ; ParseTree body = parseBlock ( ) ; ParseTree catchBlock = null ; if ( peek ( TokenType . CATCH ) ) { catchBlock = parseCatch ( ) ; } ParseTree finallyBlock = null ; if ( peek ( TokenType . FINALLY ) ) { finallyBlock = parseFinallyBlock ( ) ; } i... |
public class HttpServer { /** * Checks whether the request has been handled ( value of { @ link Request }
* event set to ` true ` ) or the status code in the prepared response
* is no longer " Not Implemented " . If not , but a fall back has been set ,
* send a " Not Found " response . If this isn ' t the case ei... | final Request . In requestEvent = event . event ( ) ; // A check that also works with null .
if ( Boolean . TRUE . equals ( requestEvent . get ( ) ) || requestEvent . httpRequest ( ) . response ( ) . map ( response -> response . statusCode ( ) != HttpStatus . NOT_IMPLEMENTED . statusCode ( ) ) . orElse ( false ) ) { //... |
public class EmptyIfOtherHasValueValidator { /** * { @ inheritDoc } initialize the validator .
* @ see javax . validation . ConstraintValidator # initialize ( java . lang . annotation . Annotation ) */
@ Override public final void initialize ( final EmptyIfOtherHasValue pconstraintAnnotation ) { } } | message = pconstraintAnnotation . message ( ) ; fieldCheckName = pconstraintAnnotation . field ( ) ; fieldCompareName = pconstraintAnnotation . fieldCompare ( ) ; valueCompare = pconstraintAnnotation . valueCompare ( ) ; |
public class Packer { /** * Generate RSA KeyPair
* @ param keyLen in bits ( 2048 recomended )
* @ return
* @ throws NoSuchAlgorithmException */
public static KeyPair generateKeyPair ( final int keyLen ) throws NoSuchAlgorithmException { } } | final String name = ASYM_CIPHER_CHAIN_PADDING ; final int offset = name . indexOf ( '/' ) ; final String alg = ( ( offset < 0 ) ? name : name . substring ( 0 , offset ) ) ; final KeyPairGenerator generator = KeyPairGenerator . getInstance ( alg ) ; generator . initialize ( keyLen ) ; return generator . genKeyPair ( ) ; |
public class Query { /** * Create a copy of this query , but one whose results should be ordered by the supplied orderings .
* @ param orderings the result ordering specification that should be used ; never null
* @ return the copy of the query that uses the supplied ordering ; never null */
public Query orderedBy ... | return new Query ( source , constraint , orderings , columns , getLimits ( ) , distinct ) ; |
public class TimecodeBuilder { /** * Reset this builder to the values in the provided Timecode
* @ param timecode
* @ return */
public TimecodeBuilder withTimecode ( Timecode timecode ) { } } | return this . withNegative ( timecode . isNegative ( ) ) . withDays ( timecode . getDaysPart ( ) ) . withHours ( timecode . getHoursPart ( ) ) . withMinutes ( timecode . getMinutesPart ( ) ) . withSeconds ( timecode . getSecondsPart ( ) ) . withFrames ( timecode . getFramesPart ( ) ) . withDropFrame ( timecode . isDrop... |
public class ValidatedConformanceConfig { /** * Creates a validated configuration object .
* @ throws IllegalArgumentException if there is an error in the config object . */
public static ValidatedConformanceConfig create ( ConformanceConfig config ) { } } | ImmutableList . Builder < RuleWithWhitelists > rulesBuilder = new ImmutableList . Builder < > ( ) ; for ( Requirement requirement : config . getRequirementList ( ) ) { Preconditions . checkArgument ( ! requirement . getErrorMessage ( ) . isEmpty ( ) , "requirement missing error message" ) ; Preconditions . checkArgumen... |
public class SortedBugCollection { /** * Read XML data from given file into this object , populating given Project
* as a side effect .
* @ param file
* the file */
public void readXML ( File file ) throws IOException , DocumentException { } } | project . setCurrentWorkingDirectory ( file . getParentFile ( ) ) ; dataSource = file . getAbsolutePath ( ) ; InputStream in = progessMonitoredInputStream ( file , "Loading analysis" ) ; try { readXML ( in , file ) ; } catch ( IOException e ) { throw newIOException ( file , e ) ; } catch ( DocumentException e ) { throw... |
public class Caster { /** * cast a value to a value defined by type argument
* @ param pc
* @ param type type of the returning Value
* @ param o Object to cast
* @ return casted Value
* @ throws PageException */
public static Object castTo ( PageContext pc , short type , Object o ) throws PageException { } } | if ( type == CFTypes . TYPE_ANY ) return o ; else if ( type == CFTypes . TYPE_ARRAY ) return toArray ( o ) ; else if ( type == CFTypes . TYPE_BOOLEAN ) return toBoolean ( o ) ; else if ( type == CFTypes . TYPE_BINARY ) return toBinary ( o ) ; else if ( type == CFTypes . TYPE_DATETIME ) return DateCaster . toDateAdvance... |
public class HttpBody { /** * Sets the charset used for { @ code String } related operations , for example , { @ link # append ( String ) } ,
* { @ link # setBody ( String ) } , or { @ link # toString ( ) } .
* The charset is reset if { @ code null } or empty ( that is , it will use default charset or the charset d... | if ( StringUtils . isEmpty ( charsetName ) ) { setCharsetImpl ( null ) ; return ; } Charset newCharset = null ; try { newCharset = Charset . forName ( charsetName ) ; if ( newCharset != charset ) { setCharsetImpl ( newCharset ) ; } } catch ( IllegalCharsetNameException | UnsupportedCharsetException e ) { log . error ( ... |
public class S3Uploader { /** * 根据文件长度获取写操作超时时间 , 默认按照 50kb 的速率计算
* 最小不超过 30s , 最大不超过 240s
* @ param dataLength
* @ return */
private int getWriteTimeoutByLength ( int dataLength ) { } } | int writeSecond = dataLength / DEFAULT_MIN_UPLOAD_RATE ; if ( writeSecond < DEFAULT_MIN_WRITE_TIMEOUT ) { writeSecond = DEFAULT_MIN_WRITE_TIMEOUT ; } else if ( writeSecond > DEFAULT_MAX_WRITE_TIMEOUT ) { writeSecond = DEFAULT_MAX_WRITE_TIMEOUT ; } return writeSecond ; |
public class UpdateEndpointWeightsAndCapacitiesRequest { /** * An object that provides new capacity and weight values for a variant .
* @ param desiredWeightsAndCapacities
* An object that provides new capacity and weight values for a variant . */
public void setDesiredWeightsAndCapacities ( java . util . Collectio... | if ( desiredWeightsAndCapacities == null ) { this . desiredWeightsAndCapacities = null ; return ; } this . desiredWeightsAndCapacities = new java . util . ArrayList < DesiredWeightAndCapacity > ( desiredWeightsAndCapacities ) ; |
public class ControlMessageImpl { /** * Flatten the message into a List of DataSlices for for transmission .
* Javadoc description supplied by ControlMessage interface . */
public final List < DataSlice > encodeFast ( Object conn ) throws MessageEncodeFailedException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "encodeFast" ) ; // ControlMessages are always single part small messages , so we encode them
// to a single DataSlice .
List < DataSlice > slices = new ArrayList < DataSlice > ( 1 ) ; slices . add ( jmo . encodeSingl... |
public class RoboFont { /** * Resolves the CTFont for the PlayN { @ code font } . { @ code font } may be { @ code null } , in which
* case the default font is returned . */
static CTFont resolveFont ( Font font ) { } } | CTFont ctFont = fonts . get ( font == null ? DEFAULT_FONT : font ) ; if ( ctFont == null ) { String iosName = getVariant ( font . name , font . style ) ; fonts . put ( font , ctFont = CTFont . create ( iosName , font . size , CGAffineTransform . Identity ( ) ) ) ; } return ctFont ; |
public class AuditServiceImpl { /** * Write parameters to RegistryService .
* @ param sessionProvider The SessionProvider
* @ throws ParserConfigurationException
* @ throws SAXException
* @ throws IOException
* @ throws RepositoryException */
private void writeParamsToRegistryService ( SessionProvider session... | Document doc = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . newDocument ( ) ; Element root = doc . createElement ( SERVICE_NAME ) ; doc . appendChild ( root ) ; Element element = doc . createElement ( ADMIN_INDENTITY ) ; setAttributeSmart ( element , "value" , adminIdentity ) ; root . appendChild... |
public class AWSIotClient { /** * Disassociates a Device Defender security profile from a thing group or from this account .
* @ param detachSecurityProfileRequest
* @ return Result of the DetachSecurityProfile operation returned by the service .
* @ throws InvalidRequestException
* The request is not valid .
... | request = beforeClientExecution ( request ) ; return executeDetachSecurityProfile ( request ) ; |
public class ObjectSerialization { /** * Reads an object from a file */
public static < T extends SerializableObject > T deserialize ( File file , Class < T > cls ) throws IOException { } } | FileInputStream stream = null ; try { stream = new FileInputStream ( file ) ; DataInputStream in = new DataInputStream ( stream ) ; try { Constructor < T > constructor = cls . getDeclaredConstructor ( DataInput . class ) ; constructor . setAccessible ( true ) ; return constructor . newInstance ( in ) ; } catch ( Except... |
public class Subscriber { /** * Notifies all registered listeners of the inactive peer */
private void notifyInactive ( Peer peer ) { } } | for ( Listener listener : new HashSet < > ( listeners ) ) { listener . onInactive ( peer ) ; } |
public class HandlerOperations { /** * Handle updating the configuration .
* @ param attribute the attribute definition
* @ param context the context of the operation
* @ param model the model to update
* @ param logContextConfiguration the log context configuration
* @ param configuration the handler configu... | handleProperty ( attribute , context , model , logContextConfiguration , configuration , true ) ; |
public class List { /** * indexed setter for itemList - sets an indexed value - contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
* @ generated
* @ param i index in the array to set
* @ param v ... | if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList ) , i ) ; jcasType... |
public class CommercePriceEntryLocalServiceUtil { /** * Returns a range of all the commerce price entries .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result se... | return getService ( ) . getCommercePriceEntries ( start , end ) ; |
public class GroupElement { /** * Adds a child to the current GroupElement .
* Restrictions are :
* NOT / EXISTS : can have only one child , either a single Pattern or another CE */
public void addChild ( final RuleConditionElement child ) { } } | if ( ( this . isNot ( ) || this . isExists ( ) ) && ( this . children . size ( ) > 0 ) ) { throw new RuntimeException ( this . type . toString ( ) + " can have only a single child element. Either a single Pattern or another CE." ) ; } this . children . add ( child ) ; |
public class CATMainConsumer { /** * Sets the async callback to be used for this consumer session .
* This method will set up the subconsumer that will be used for
* this consumer session . If read ahead is permitted then the
* < code > CATProxyConsumer < / code > is used as the subconsumer ,
* otherwise the < ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setAsynchConsumerCallback" , new Object [ ] { requestNumber , maxActiveMessages , messageLockExpiry , batchsize , orderContext , stoppable , maxSequentialFailures , hiddenMessageDelay } ) ; checkNotBrowserSession ( )... |
public class Entry { /** * We want to add a new piggy back . Check for timer task and convert it to
* piggy back . */
private PiggyBack existingPiggyBackForInserting ( ) { } } | Object _misc = misc ; if ( _misc instanceof SimpleTimerTask ) { return new TaskPiggyBack ( ( SimpleTimerTask ) _misc , null ) ; } return ( PiggyBack ) _misc ; |
public class CommerceAddressLocalServiceBaseImpl { /** * Adds the commerce address to the database . Also notifies the appropriate model listeners .
* @ param commerceAddress the commerce address
* @ return the commerce address that was added */
@ Indexable ( type = IndexableType . REINDEX ) @ Override public Comme... | commerceAddress . setNew ( true ) ; return commerceAddressPersistence . update ( commerceAddress ) ; |
public class ResolvableType { /** * Determine whether the underlying type represents a wildcard without specific bounds ( i . e . , equal to
* { @ code ? extends Object } ) . */
private boolean isWildcardWithoutBounds ( ) { } } | if ( this . type instanceof WildcardType ) { WildcardType wt = ( WildcardType ) this . type ; if ( wt . getLowerBounds ( ) . length == 0 ) { Type [ ] upperBounds = wt . getUpperBounds ( ) ; if ( upperBounds . length == 0 || ( upperBounds . length == 1 && Object . class == upperBounds [ 0 ] ) ) { return true ; } } } ret... |
public class ConfigurableFactory { /** * factory method for creating new instances
* the Class to be instantiated is defined by getClassToServe ( ) .
* @ return Object the created instance */
public Object createNewInstance ( Class type , Object arg ) { } } | if ( type != null ) return createNewInstance ( new Class [ ] { type } , new Object [ ] { arg } ) ; else return createNewInstance ( ( Class [ ] ) null , ( Object [ ] ) null ) ; |
public class OnExitScriptTypeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case DroolsPackage . ON_EXIT_SCRIPT_TYPE__SCRIPT : setScript ( ( String ) newValue ) ; return ; case DroolsPackage . ON_EXIT_SCRIPT_TYPE__SCRIPT_FORMAT : setScriptFormat ( ( String ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class CompactIntListUtil { /** * Looks for an element that is equal to the supplied value and
* returns its index in the array .
* @ return the index of the first matching value if one was found ,
* - 1 otherwise . */
public static int indexOf ( int [ ] list , int value ) { } } | int llength = list . length ; // no optimizing bastards
for ( int i = 0 ; i < llength ; i ++ ) { if ( list [ i ] == value ) { return i ; } } return - 1 ; |
public class I18nSeService { /** * < p > Setter for hasName . < / p >
* @ param pHasName reference */
@ Override public final void setHasName ( final SeService pHasName ) { } } | this . hasName = pHasName ; if ( this . itsId == null ) { this . itsId = new IdI18nSeService ( ) ; } this . itsId . setHasName ( this . hasName ) ; |
public class JDBCClientImpl { /** * Open a JDBC connection to the database
* @ throws java . sql . SQLException If a SQL error occurs
* @ throws java . lang . ClassNotFoundException If the driver class does not exists */
public void open ( ) throws SQLException , ClassNotFoundException { } } | logger . info ( "Using database driver: " + jdbcDriver ) ; Class . forName ( jdbcDriver ) ; logger . info ( "Using database.url: " + jdbcURL ) ; // connect login / pass
con = DriverManager . getConnection ( jdbcURL , user , password ) ; // Exception will be thrown if something went wrong
connected = true ; |
public class JHipsterMetricsEndpoint { /** * GET / management / jhi - metrics
* Give metrics displayed on Metrics page
* @ return a Map with a String defining a category of metrics as Key and
* another Map containing metrics related to this category as Value */
@ ReadOperation public Map < String , Map > allMetri... | Map < String , Map > results = new HashMap < > ( ) ; // JVM stats
results . put ( "jvm" , this . jvmMemoryMetrics ( ) ) ; // HTTP requests stats
results . put ( "http.server.requests" , this . httpRequestsMetrics ( ) ) ; // Cache stats
results . put ( "cache" , this . cacheMetrics ( ) ) ; // Service stats
results . put... |
public class CleaneLingSolver { /** * Performs bounded inprocessing .
* @ return the status after simplification */
private Tristate simplify ( ) { } } | assert this . simplifier == Simplifier . NOSIMP ; this . simplifier = Simplifier . TOPSIMP ; this . stats . simplifications ++ ; backtrack ( ) ; final int varsBefore = remainingVars ( ) ; if ( ! this . config . plain ) { if ( this . empty == null ) { distill ( ) ; } if ( this . empty == null ) { block ( ) ; } if ( this... |
public class InternalArrayIterate { /** * Implemented to avoid megamorphic call on castProcedure . */
private static < T > void batchGroupBy ( T [ ] array , int start , int end , MultimapPutProcedure < ? , T > castProcedure ) { } } | for ( int i = start ; i < end ; i ++ ) { castProcedure . value ( array [ i ] ) ; } |
public class ModifierUtils { /** * Determines the { @ link Modifier modifiers } for a given { @ link Class } or { @ link Member } .
* @ param obj { @ link Object } to evaluate . The { @ link Object } must be a { @ link Class } or a { @ link Member } .
* @ return the { @ link Modifier modifiers } for the given { @ l... | return ( obj instanceof Class ? ( ( Class < ? > ) obj ) . getModifiers ( ) : ( obj instanceof Member ? ( ( Member ) obj ) . getModifiers ( ) : 0 ) ) ; |
public class EJBMethodInfoImpl { /** * d140003.35 */
public void initializeInstanceData ( String methodSign , String methodNameOnly , BeanMetaData beanMetaData , MethodInterface methodInterface , // d162441 199625
TransactionAttribute tranAttr , boolean asyncMethod ) // 199625
{ } } | this . methodSignature = methodSign ; // 92697
this . methodName = methodNameOnly ; this . bmd = beanMetaData ; this . ivInterface = methodInterface ; // d162441
this . txAttr = tranAttr ; // 199625
this . ivAsynchMethod = asyncMethod ; // Method info stack may be used for Entity or Stateful . F743-29185
if ( bmd != nu... |
public class BezierCurve { /** * Estimates path length so that most of the time estimated path is longer
* that actual .
* @ param controlPoints
* @ return */
public double pathLengthEstimate ( Point2D . Double ... controlPoints ) { } } | if ( controlPoints . length != length ) { throw new IllegalArgumentException ( "control-points length not " + length ) ; } double [ ] cp = convert ( controlPoints ) ; return pathLengthEstimate ( cp ) ; |
public class TextRowProtocol { /** * Get boolean from raw text format .
* @ param columnInfo column information
* @ return boolean value */
public boolean getInternalBoolean ( ColumnInformation columnInfo ) { } } | if ( lastValueWasNull ( ) ) { return false ; } if ( columnInfo . getColumnType ( ) == ColumnType . BIT ) { return parseBit ( ) != 0 ; } final String rawVal = new String ( buf , pos , length , StandardCharsets . UTF_8 ) ; return ! ( "false" . equals ( rawVal ) || "0" . equals ( rawVal ) ) ; |
public class LogFilePatternReceiver { /** * Helper method that supports the evaluation of the expression
* @ param event
* @ return true if expression isn ' t set , or the result of the evaluation otherwise */
private boolean passesExpression ( LoggingEvent event ) { } } | if ( event != null ) { if ( expressionRule != null ) { return ( expressionRule . evaluate ( event , null ) ) ; } } return true ; |
public class PluginManager { /** * TODO : Consider refactoring in order to avoid DMI _ COLLECTION _ OF _ URLS */
@ SuppressFBWarnings ( value = "DMI_COLLECTION_OF_URLS" , justification = "Plugin loading happens only once on Jenkins startup" ) protected static void addDependencies ( URL hpiResUrl , String fromPath , Set... | if ( dependencySet . contains ( hpiResUrl ) ) { return ; } Manifest manifest = parsePluginManifest ( hpiResUrl ) ; String dependencySpec = manifest . getMainAttributes ( ) . getValue ( "Plugin-Dependencies" ) ; if ( dependencySpec != null ) { String [ ] dependencyTokens = dependencySpec . split ( "," ) ; ServletContext... |
public class ServerSocketEndpointConfig { /** * Sets the port the Hazelcast member will try to bind on .
* A valid port value is between 0 and 65535.
* A port number of 0 will let the system pick up an ephemeral port .
* @ param port the port the Hazelcast member will try to bind on
* @ return NetworkConfig the... | if ( port < 0 || port > PORT_MAX ) { throw new IllegalArgumentException ( "Port out of range: " + port + ". Allowed range [0,65535]" ) ; } this . port = port ; return this ; |
public class LocaleUtils { /** * < p > Converts a String to a Locale . < / p >
* < p > This method takes the string format of a locale and creates the
* locale object from it . < / p >
* < pre >
* LocaleUtils . toLocale ( " " ) = new Locale ( " " , " " )
* LocaleUtils . toLocale ( " en " ) = new Locale ( " en... | if ( str == null ) { return null ; } if ( str . isEmpty ( ) ) { // LANG - 941 - JDK 8 introduced an empty locale where all fields are blank
return new Locale ( StringUtils . EMPTY , StringUtils . EMPTY ) ; } if ( str . contains ( "#" ) ) { // LANG - 879 - Cannot handle Java 7 script & extensions
throw new IllegalArgume... |
public class SyncAgentsInner { /** * Lists databases linked to a sync agent .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; SyncAgentLinkedData... | return listLinkedDatabasesNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < SyncAgentLinkedDatabaseInner > > , Page < SyncAgentLinkedDatabaseInner > > ( ) { @ Override public Page < SyncAgentLinkedDatabaseInner > call ( ServiceResponse < Page < SyncAgentLinkedDatabaseInner > > r... |
public class OperationValidator { /** * Validates an operation against its description provider
* @ param operation The operation to validate
* @ throws IllegalArgumentException if the operation is not valid */
public void validateOperation ( final ModelNode operation ) { } } | if ( operation == null ) { return ; } final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String name = operation . get ( OP ) . asString ( ) ; OperationEntry entry = root . getOperationEntry ( address , name ) ; if ( entry == null ) { throwOrWarnAboutDescriptorProblem ( Contro... |
public class ExpressionUtils { /** * Create a new root variable based on the given path and suffix
* @ param path base path
* @ param suffix suffix for variable name
* @ return path expression */
public static String createRootVariable ( Path < ? > path , int suffix ) { } } | String variable = path . accept ( ToStringVisitor . DEFAULT , TEMPLATES ) ; return variable + "_" + suffix ; |
public class CheckpointListener { /** * Load a MultiLayerNetwork for the given checkpoint number
* @ param rootDir The directory that the checkpoint resides in
* @ param checkpointNum Checkpoint model to load
* @ return The loaded model */
public static MultiLayerNetwork loadCheckpointMLN ( File rootDir , int che... | File f = getFileForCheckpoint ( rootDir , checkpointNum ) ; try { return ModelSerializer . restoreMultiLayerNetwork ( f , true ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } |
public class FlattenMojo { /** * Collects the resolved { @ link Dependency dependencies } from the given < code > effectiveModel < / code > .
* @ param effectiveModel is the effective POM { @ link Model } to process .
* @ param flattenedDependencies is the { @ link List } where to add the collected { @ link Depende... | getLog ( ) . debug ( "Resolving dependencies of " + effectiveModel . getId ( ) ) ; // this . project . getDependencies ( ) already contains the inherited dependencies but also those from profiles
// List < Dependency > projectDependencies = currentProject . getOriginalModel ( ) . getDependencies ( ) ;
List < Dependency... |
public class ReplCache { /** * Removes all keys and values in the L2 and L1 caches */
@ ManagedOperation public void clear ( ) { } } | Set < K > keys = new HashSet < > ( l2_cache . getInternalMap ( ) . keySet ( ) ) ; mcastClear ( keys , false ) ; |
public class Vessel { /** * Returns estimated latitude at et
* @ param et
* @ return */
public final double estimatedLatitude ( long et ) { } } | et = correctedTime ( et ) ; lock . lock ( ) ; try { calc ( ) ; if ( rateOfTurn == 0 ) { double dist = calcDist ( et ) ; return latitude + deltaLatitude ( dist , bearing ) ; } else { double deg = calcDeg ( et ) ; return centerLatitude + deltaLatitude ( radius , deg ) ; } } finally { lock . unlock ( ) ; } |
public class AVIMConversation { /** * 查询黑名单的成员列表
* @ param offset 查询结果的起始点
* @ param limit 查询结果集上限
* @ param callback 结果回调函数 */
public void queryBlockedMembers ( int offset , int limit , final AVIMConversationSimpleResultCallback callback ) { } } | if ( null == callback ) { return ; } else if ( offset < 0 || limit > 100 ) { callback . internalDone ( null , new AVIMException ( new IllegalArgumentException ( "offset/limit is illegal." ) ) ) ; return ; } Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( Conversation . QUERY_PARAM_... |
public class DitamapIndexTermReader { /** * Check element stack for the root topicref or indexterm element . */
private boolean needPushTerm ( ) { } } | if ( elementStack . empty ( ) ) { return false ; } if ( elementStack . peek ( ) instanceof TopicrefElement ) { // for dita files the indexterm has been moved to its < prolog >
// therefore we don ' t need to collect these terms again .
final TopicrefElement elem = ( TopicrefElement ) elementStack . peek ( ) ; if ( inde... |
public class WriteBufferDevice { /** * { @ inheritDoc } */
public void write ( final long address , final byte [ ] data ) throws Exception { } } | buffer . put ( address , data ) ; writeCount ++ ; if ( writeCount >= MAX_WRITE_COUNT ) { writeCount = 0 ; flush ( ) ; } |
public class SQLRunner { /** * Adds the type criteria .
* @ param _ print the print */
private void addTypeCriteria ( final QueryPrint _print ) { } } | final MultiValuedMap < TableIdx , TypeCriteria > typeCriterias = MultiMapUtils . newListValuedHashMap ( ) ; final List < Type > types = _print . getTypes ( ) . stream ( ) . sorted ( ( type1 , type2 ) -> Long . compare ( type1 . getId ( ) , type2 . getId ( ) ) ) . collect ( Collectors . toList ( ) ) ; for ( final Type t... |
public class JPAExEntityManager { /** * When SFSB instance is created ( either using bean home create ( ) , @ PersistenceContext
* dependency injection or JNDI lookup ) , this method is called to determine the extend - scoped
* persistence context inheritance and bind the SFSBs to the associated persistence context... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "boundSfsbToExtendedPC : " + j2eeName + ", isBMT=" + isBMT + ", ExPcPuIds=" + Arrays . toString ( exPcPuIds ) + ", unsynchronizedJPAPuIdSet=" + unsynchronizedJPAPuIdSet ) ; if ( unsynchronizedJPAPuIdSet == null ) { unsynchroniz... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.