signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class XNElement { /** * Set an attribute value identified by a local name and namespace . * @ param name the attribute name * @ param namespace the attribute namespace * @ param value the value , if null , the attribute will be removed */ public void set ( String name , String namespace , Object value ) { ...
if ( value != null ) { if ( value instanceof Date ) { attributes . put ( new XAttributeName ( name , namespace , null ) , formatDateTime ( ( Date ) value ) ) ; } else { attributes . put ( new XAttributeName ( name , namespace , null ) , value . toString ( ) ) ; } } else { attributes . remove ( new XAttributeName ( name...
public class PathMetadataFactory { /** * Create a new PathMetadata instance for indexed list access * @ param parent parent path * @ param index index of element * @ return list access path */ public static PathMetadata forListAccess ( Path < ? > parent , @ Nonnegative int index ) { } }
return new PathMetadata ( parent , index , PathType . LISTVALUE_CONSTANT ) ;
public class PerspectiveOps { /** * Given the intrinsic parameters create a calibration matrix * @ param param Intrinsic parameters structure that is to be converted into a matrix * @ param K Storage for calibration matrix , must be 3x3 . If null then a new matrix is declared * @ return Calibration matrix 3x3 */ ...
return ImplPerspectiveOps_F64 . pinholeToMatrix ( param , K ) ;
public class GeometryEngine { /** * Creates the symmetric difference of two geometries . * See OperatorSymmetricDifference . * @ param leftGeometry * is one of the Geometry instances in the XOR operation . * @ param rightGeometry * is one of the Geometry instances in the XOR operation . * @ param spatialRef...
OperatorSymmetricDifference op = ( OperatorSymmetricDifference ) factory . getOperator ( Operator . Type . SymmetricDifference ) ; Geometry result = op . execute ( leftGeometry , rightGeometry , spatialReference , null ) ; return result ;
public class XMLResultsParser { /** * Returns the new base URI , based on the old base URI and the xml : base value in the current element . */ static private String getBase ( String oldBase , XMLStreamReader rdr ) { } }
String newBase = resolve ( oldBase , rdr . getAttributeValue ( XML_NS , BASE ) ) ; if ( newBase != oldBase ) { logger . debug ( "xml:base is now {}" , newBase ) ; } return newBase ;
public class SelectResultSet { /** * { inheritDoc } . */ public Blob getBlob ( int columnIndex ) throws SQLException { } }
checkObjectRange ( columnIndex ) ; if ( row . lastValueWasNull ( ) ) { return null ; } return new MariaDbBlob ( row . buf , row . pos , row . length ) ;
public class GraphUtils { /** * Debugging : dot representation of a set of connected nodes . The resulting * dot representation will use { @ code Node . toString } to display node labels * and { @ code Node . printDependency } to display edge labels . The resulting * representation is also customizable with a gra...
StringBuilder buf = new StringBuilder ( ) ; buf . append ( String . format ( "digraph %s {\n" , name ) ) ; buf . append ( String . format ( "label = %s;\n" , DotVisitor . wrap ( header ) ) ) ; DotVisitor < D , N > dotVisitor = new DotVisitor < > ( ) ; dotVisitor . visit ( nodes , buf ) ; buf . append ( "}\n" ) ; return...
public class CPAttachmentFileEntryPersistenceImpl { /** * Returns the cp attachment file entry where uuid = & # 63 ; and groupId = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache . * @ param uuid the uuid * @ param groupId the group ID * @ return the matching cp attac...
return fetchByUUID_G ( uuid , groupId , true ) ;
public class Op { /** * Splits the string around the given delimiter * @ param string is the string to split * @ param delimiter is the substrings on which the string will be split * @ param ignoreEmpty whether the empty strings are discarded * @ return the string split around the given delimiter */ public stat...
List < String > result = new ArrayList < String > ( ) ; if ( string . isEmpty ( ) || delimiter . isEmpty ( ) ) { result . add ( string ) ; return result ; } int position = 0 , next = 0 ; while ( next >= 0 ) { next = string . indexOf ( delimiter , position ) ; String token ; if ( next < 0 ) { token = string . substring ...
public class FlashImpl { /** * Restore any saved FacesMessages from the previous request . * Note that we don ' t need to save the keepMessages value for this request , * because we just have to check if the value for FLASH _ KEEP _ MESSAGES _ LIST exists . * @ param facesContext */ @ SuppressWarnings ( "unchecke...
List < MessageEntry > messageList = ( List < MessageEntry > ) _getExecuteFlashMap ( facesContext ) . get ( FLASH_KEEP_MESSAGES_LIST ) ; if ( messageList != null ) { Iterator < MessageEntry > iterMessages = messageList . iterator ( ) ; while ( iterMessages . hasNext ( ) ) { MessageEntry entry = iterMessages . next ( ) ;...
public class JsonConfig { /** * Returns a set of default excludes with user - defined excludes . < br > * Takes into account any additional excludes per matching class . * [ Java - & gt ; JSON ] */ public Collection getMergedExcludes ( Class target ) { } }
if ( target == null ) { return getMergedExcludes ( ) ; } Collection exclusionSet = getMergedExcludes ( ) ; if ( ! exclusionMap . isEmpty ( ) ) { Object key = propertyExclusionClassMatcher . getMatch ( target , exclusionMap . keySet ( ) ) ; Set set = ( Set ) exclusionMap . get ( key ) ; if ( set != null && ! set . isEmp...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcFilterType ( ) { } }
if ( ifcFilterTypeEClass == null ) { ifcFilterTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 238 ) ; } return ifcFilterTypeEClass ;
public class CsvProcessor { /** * Read in all of the entities in the file passed in . * @ param file * Where to read the header and entities from . It will be closed when the method returns . * @ param parseErrors * If not null , any errors will be added to the collection and null will be returned . If validate...
checkEntityConfig ( ) ; return readAll ( new FileReader ( file ) , parseErrors ) ;
public class ImageHandlerBuilder { /** * Uses compression quality of < code > qualityPercent < / code > . * Can be applied multiple times * @ param qualityPercent the percentage of compression quality wanted . Must be between 0.0 and 1.0 * @ return this for chaining */ public ImageHandlerBuilder reduceQuality ( f...
ImageWriter imageWriter = ImageIO . getImageWritersByFormatName ( fn . extension ( ) ) . next ( ) ; if ( imageWriter != null ) { ImageWriteParam writeParam = imageWriter . getDefaultWriteParam ( ) ; writeParam . setCompressionMode ( ImageWriteParam . MODE_EXPLICIT ) ; writeParam . setCompressionQuality ( qualityPercent...
public class HttpResponse { /** * 强制同步 , 用于初始化 < br > * 强制同步后变化如下 : * < pre > * 1 、 读取body内容到内存 * 2 、 异步状态设为false ( 变为同步状态 ) * 3 、 关闭Http流 * 4 、 断开与服务器连接 * < / pre > * @ return this */ private HttpResponse forceSync ( ) { } }
// 非同步状态转为同步状态 try { this . readBody ( this . in ) ; } catch ( IORuntimeException e ) { if ( e . getCause ( ) instanceof FileNotFoundException ) { // 服务器无返回内容 , 忽略之 } else { throw new HttpException ( e ) ; } } finally { if ( this . isAsync ) { this . isAsync = false ; } this . close ( ) ; } return this ;
public class MqttSpout { /** * { @ inheritDoc } */ @ Override public void ack ( Object msgId ) { } }
Message message = this . ackWaitMap . remove ( msgId ) ; if ( message != null ) { message . ack ( ) ; }
public class Signature { /** * Returns the return type for the provided string . * @ param s String * @ return { @ link ReturnType } */ private static ReturnType returnType ( final String s ) { } }
String [ ] args = ARGS_REGEX . split ( s ) ; return ReturnType . getReturnType ( args [ args . length - 1 ] ) ;
public class WebAuthenticatorProxy { /** * Get the appropriate Authenticator based on the authType * @ param authType the auth type , either FORM or BASIC * @ param the WebRequest * @ return The WebAuthenticator or { @ code null } if the authType is unknown */ private WebAuthenticator getAuthenticatorForFailOver ...
WebAuthenticator authenticator = null ; if ( LoginConfiguration . FORM . equals ( authType ) ) { authenticator = createFormLoginAuthenticator ( webRequest ) ; } else if ( LoginConfiguration . BASIC . equals ( authType ) ) { authenticator = getBasicAuthAuthenticator ( ) ; } return authenticator ;
public class HttpRemoteTaskRunner { /** * held . See https : / / github . com / apache / incubator - druid / issues / 6201 */ private void taskComplete ( HttpRemoteTaskRunnerWorkItem taskRunnerWorkItem , WorkerHolder workerHolder , TaskStatus taskStatus ) { } }
Preconditions . checkState ( ! Thread . holdsLock ( statusLock ) , "Current thread must not hold statusLock." ) ; Preconditions . checkNotNull ( taskRunnerWorkItem , "taskRunnerWorkItem" ) ; Preconditions . checkNotNull ( taskStatus , "taskStatus" ) ; if ( workerHolder != null ) { log . info ( "Worker[%s] completed tas...
public class ProcedureRunnerNT { /** * Send a response back to the proc caller . Refactored out of coreCall for both * regular and exceptional paths . */ private void completeCall ( ClientResponseImpl response ) { } }
// if we ' re keeping track , calculate result size if ( m_perCallStats . samplingProcedure ( ) ) { m_perCallStats . setResultSize ( response . getResults ( ) ) ; } m_statsCollector . endProcedure ( response . getStatus ( ) == ClientResponse . USER_ABORT , ( response . getStatus ( ) != ClientResponse . USER_ABORT ) && ...
public class Database { /** * Returns the schema and authorisation statements for the database . */ public Result getScript ( boolean indexRoots ) { } }
Result r = Result . newSingleColumnResult ( "COMMAND" , Type . SQL_VARCHAR ) ; String [ ] list = getSettingsSQL ( ) ; addRows ( r , list ) ; list = getGranteeManager ( ) . getSQL ( ) ; addRows ( r , list ) ; // schemas and schema objects such as tables , sequences , etc . list = schemaManager . getSQLArray ( ) ; addRow...
public class LPPresolver { /** * This method is just for testing scope . */ private void checkProgress ( DoubleMatrix1D c , DoubleMatrix2D A , DoubleMatrix1D b , DoubleMatrix1D lb , DoubleMatrix1D ub , DoubleMatrix1D ylb , DoubleMatrix1D yub , DoubleMatrix1D zlb , DoubleMatrix1D zub ) { } }
if ( this . expectedSolution == null ) { return ; } if ( Double . isNaN ( this . expectedTolerance ) ) { // for this to work properly , this method must be called at least one time before presolving operations start RealVector X = MatrixUtils . createRealVector ( expectedSolution ) ; RealMatrix AMatrix = MatrixUtils . ...
public class AbstractSegment3F { /** * Replies the projection a point on a segment . * @ param px * is the coordiante of the point to project * @ param py * is the coordiante of the point to project * @ param pz * is the coordiante of the point to project * @ param s1x * is the x - coordinate of the fir...
double dx = s2x - s1x ; double dy = s2y - s1y ; double dz = s2z - s1z ; if ( dx == 0. && dy == 0. && dz == 0. ) return 0. ; return ( ( px - s1x ) * dx + ( py - s1y ) * dy + ( pz - s1z ) * dz ) / ( dx * dx + dy * dy + dz * dz ) ;
public class Stream { /** * Returns a Stream concatenating zero or more Iterables . If an input Iterable is a Stream , it * is closed as soon as exhausted or as iteration completes . * @ param iterables * an Iterable with the Iterables or Streams to concatenate * @ param < T > * the type of elements * @ ret...
return new ConcatStream < Iterable < ? extends T > , T > ( create ( iterables ) ) ;
public class HelpUtil { /** * Remove and optionally close the help viewer associated with the specified page . * @ param page The page owning the help viewer . * @ param close If true , close the help viewer after removing it . */ protected static void removeViewer ( Page page , boolean close ) { } }
IHelpViewer viewer = ( IHelpViewer ) page . removeAttribute ( VIEWER_ATTRIB ) ; if ( viewer != null && close ) { viewer . close ( ) ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcMaterialDefinitionRepresentation ( ) { } }
if ( ifcMaterialDefinitionRepresentationEClass == null ) { ifcMaterialDefinitionRepresentationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 308 ) ; } return ifcMaterialDefinitionRepresentationEClass ;
public class ProjectEntityExtensionController { /** * Gets the list of information extensions for an entity */ @ RequestMapping ( value = "information/{entityType}/{id}" , method = RequestMethod . GET ) public Resources < EntityInformation > getInformation ( @ PathVariable ProjectEntityType entityType , @ PathVariable ...
// Gets the entity ProjectEntity entity = getEntity ( entityType , id ) ; // List of informations to return List < EntityInformation > informations = extensionManager . getExtensions ( EntityInformationExtension . class ) . stream ( ) . map ( x -> x . getInformation ( entity ) ) . filter ( Optional :: isPresent ) . map...
public class ExtensionFactory { /** * Store and return a weak reference equals to the passed version . * @ param rawVersion the version to find * @ return unique instance of { @ link VersionConstraint } equals to the passed one */ public Version getVersion ( String rawVersion ) { } }
Version version = this . versions . get ( rawVersion ) ; if ( version == null ) { version = new DefaultVersion ( rawVersion ) ; this . versions . put ( rawVersion , version ) ; } return version ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcPump ( ) { } }
if ( ifcPumpEClass == null ) { ifcPumpEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 485 ) ; } return ifcPumpEClass ;
public class ElemLiteralResult { /** * Get a literal result attribute by name . The name is namespaceURI : localname * if namespace is not null . * @ param name Name of literal result attribute to get * @ return literal result attribute ( AVT ) */ public AVT getLiteralResultAttribute ( String name ) { } }
if ( null != m_avts ) { int nAttrs = m_avts . size ( ) ; String namespace = null ; for ( int i = ( nAttrs - 1 ) ; i >= 0 ; i -- ) { AVT avt = ( AVT ) m_avts . get ( i ) ; namespace = avt . getURI ( ) ; if ( ( namespace != null && ( ! namespace . equals ( "" ) ) && ( namespace + ":" + avt . getName ( ) ) . equals ( name...
public class KeyValueStoreSessionIdManager { @ Override protected void doStart ( ) throws Exception { } }
log . info ( "starting..." ) ; super . doStart ( ) ; _client = newClient ( _serverString ) ; if ( _client == null ) { throw new IllegalStateException ( "newClient(" + _serverString + ") returns null." ) ; } log . info ( "use " + _client . getClass ( ) . getSimpleName ( ) + " as client factory." ) ; _client . establish ...
public class PackagesScanListener { /** * Get the projectID if this directory has any files in it . * Otherwise , return 0 meaning I don ' t have to specify this package . */ public boolean directoryContainsFiles ( File fileDir ) { } }
boolean containsFiles = false ; File [ ] files = fileDir . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { if ( ! file . isDirectory ( ) ) containsFiles = true ; } } return containsFiles ;
public class LocalTime { /** * Returns an adjusted copy of this time . * This returns a { @ code LocalTime } , based on this one , with the time adjusted . * The adjustment takes place using the specified adjuster strategy object . * Read the documentation of the adjuster to understand what adjustment will be mad...
// optimizations if ( adjuster instanceof LocalTime ) { return ( LocalTime ) adjuster ; } return ( LocalTime ) adjuster . adjustInto ( this ) ;
public class ADMath { /** * Some of this might need to change for optimal AD */ public static DoubleAD logSum ( DoubleAD [ ] logInputs , int fromIndex , int toIndex ) { } }
if ( logInputs . length == 0 ) throw new IllegalArgumentException ( ) ; if ( fromIndex >= 0 && toIndex < logInputs . length && fromIndex >= toIndex ) return new DoubleAD ( Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY ) ; int maxIdx = fromIndex ; double max = logInputs [ fromIndex ] . getval ( ) ; double maxd...
public class Decoder { /** * Decode a media packet with audio samples into an { @ code AudioFrame } . * @ param mediaPacket packet with audio samples . * @ return an { @ code AudioFrame } with normalized PCM audio samples . * @ throws JavaAVException if audio packet could not be decoded . */ public AudioFrame dec...
if ( state != State . Opened ) throw new JavaAVException ( "Could not decode audio, decoder is not opened." ) ; if ( codec . getType ( ) != MediaType . AUDIO ) throw new JavaAVException ( "Could not decode audio, this is a non-audio decoder." ) ; if ( mediaPacket == null ) throw new JavaAVException ( "No audio passed t...
public class WValidationErrors { /** * Sets the message box title . * @ param title the message box title to set , using { @ link MessageFormat } syntax . * @ param args optional arguments for the message format string . */ public void setTitleText ( final String title , final Serializable ... args ) { } }
ValidationErrorsModel model = getOrCreateComponentModel ( ) ; model . title = I18nUtilities . asMessage ( title , args ) ;
public class GetReconciliationOrderReportsForReconciliationReport { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ param reconciliationReportId the ID of the reconciliation report . * @ throws ApiException if the API request failed with one or mor...
ReconciliationOrderReportServiceInterface reconciliationOrderReportService = adManagerServices . get ( session , ReconciliationOrderReportServiceInterface . class ) ; // Create a statement to select reconciliation order reports . StatementBuilder statementBuilder = new StatementBuilder ( ) . where ( "reconciliationRepo...
public class TransparentDataEncryptionsInner { /** * Gets a database ' s transparent data encryption configuration . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of ...
return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < TransparentDataEncryptionInner > , TransparentDataEncryptionInner > ( ) { @ Override public TransparentDataEncryptionInner call ( ServiceResponse < TransparentDataEncryptionInner > response ) { ret...
public class EvaluateVarianceRatioCriteria { /** * Update the global centroid . * @ param overallCentroid Centroid to udpate * @ param rel Data relation * @ param clusters Clusters * @ param centroids Cluster centroids * @ return Number of clusters */ public static int globalCentroid ( Centroid overallCentroi...
int clustercount = 0 ; Iterator < ? extends Cluster < ? > > ci = clusters . iterator ( ) ; for ( int i = 0 ; ci . hasNext ( ) ; i ++ ) { Cluster < ? > cluster = ci . next ( ) ; if ( cluster . size ( ) <= 1 || cluster . isNoise ( ) ) { switch ( noiseOption ) { case IGNORE_NOISE : continue ; // Ignore completely case TRE...
public class CompromisedCredentialsActionsTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CompromisedCredentialsActionsType compromisedCredentialsActionsType , ProtocolMarshaller protocolMarshaller ) { } }
if ( compromisedCredentialsActionsType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( compromisedCredentialsActionsType . getEventAction ( ) , EVENTACTION_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to ma...
public class AmazonRekognitionClient { /** * Gets the face search results for Amazon Rekognition Video face search started by < a > StartFaceSearch < / a > . The * search returns faces in a collection that match the faces of persons detected in a video . It also includes the * time ( s ) that faces are matched in t...
request = beforeClientExecution ( request ) ; return executeGetFaceSearch ( request ) ;
public class SSLSocketChannel { /** * Creates connection to a named peer using given SSLContext . Connection * is in client mode but can be changed before read / write . * @ param peer * @ param port * @ param sslContext * @ return * @ throws IOException */ public static SSLSocketChannel open ( String peer ...
SSLEngine engine = sslContext . createSSLEngine ( peer , port ) ; engine . setUseClientMode ( true ) ; SSLParameters sslParameters = engine . getSSLParameters ( ) ; SNIServerName hostName = new SNIHostName ( peer ) ; List < SNIServerName > list = new ArrayList < > ( ) ; list . add ( hostName ) ; sslParameters . setServ...
public class VodClient { /** * Gets the properties of specific media resource managed by VOD service . * The caller < i > must < / i > authenticate with a valid BCE Access Key / Private Key pair . * @ param mediaId The unique ID for each media resource * @ return The properties of the specific media resource */ p...
GetMediaResourceRequest request = new GetMediaResourceRequest ( ) . withMediaId ( mediaId ) ; return getMediaResource ( request ) ;
public class LogManager { /** * default value . */ String getStringProperty ( String name , String defaultValue ) { } }
String val = getProperty ( name ) ; if ( val == null ) { return defaultValue ; } return val . trim ( ) ;
public class Converter { /** * Returns a converter based on < i > existing < / i > forward and backward * functions . Note that it is unnecessary to create < i > new < / i > classes * implementing { @ code Function } just to pass them in here . Instead , simply * subclass { @ code Converter } and implement its { ...
return new FunctionBasedConverter < A , B > ( forwardFunction , backwardFunction ) ;
public class Sign { /** * 返回用户访问资源的签名 * @ param cred * 包含用户秘钥信息 * @ param bucketName * bucket名 * @ param cosPath * 要签名的cos路径 * @ param expired * 超时时间 * @ param uploadFlag * 除了生成下载签名 , 其他情况updateFlag皆为true * @ return 返回base64编码的字符串 * @ throws AbstractCosException */ private static String appSigna...
int appId = cred . getAppId ( ) ; String secretId = cred . getSecretId ( ) ; String secretKey = cred . getSecretKey ( ) ; long now = System . currentTimeMillis ( ) / 1000 ; int rdm = Math . abs ( new Random ( ) . nextInt ( ) ) ; String fileId = null ; if ( uploadFlag ) { fileId = String . format ( "/%s/%s%s" , appId , ...
public class BGRImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . BGR__GDO_NAME : setGdoName ( GDO_NAME_EDEFAULT ) ; return ; case AfplibPackage . BGR__TRIPLETS : getTriplets ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ;
public class XMLProperties { /** * Inserts elements to the given document one by one , and creates all its * parents if needed . * @ param pDocument the document to insert to . * @ param pName the name of the property element . * @ param pValue the value of the property element . * @ param pFormat * @ todo ...
// Get names of all elements we need String [ ] names = StringUtil . toStringArray ( pName , "." ) ; // Get value formatted as string String value = null ; if ( pValue != null ) { if ( pValue instanceof Date ) { // Special threatment of Date if ( pFormat != null ) { value = new SimpleDateFormat ( pFormat ) . format ( p...
public class UIDataAdaptor { /** * Copied from Richfaces UIDataAdapter # visitTree . */ @ Override public boolean visitTree ( VisitContext visitContext , VisitCallback callback ) { } }
// First check to see whether we are visitable . If not // short - circuit out of this subtree , though allow the // visit to proceed through to other subtrees . if ( ! isVisitable ( visitContext ) ) { return false ; } // Clear out the row index is one is set so that // we start from a clean slate . FacesContext facesC...
public class SharedObjectMessage { /** * { @ inheritDoc } */ public boolean addEvent ( ISharedObjectEvent . Type type , String key , Object value ) { } }
return events . add ( new SharedObjectEvent ( type , key , value ) ) ;
public class ArraySortedMap { /** * This does a linear scan which is simpler than a binary search . For a small collection size this * still should be as fast as binary search . */ private int findKeyOrInsertPosition ( K key ) { } }
int newPos = 0 ; while ( newPos < this . keys . length && this . comparator . compare ( this . keys [ newPos ] , key ) < 0 ) { newPos ++ ; } return newPos ;
public class GetSingleConversationOptions { /** * Used when setting the " visible " field in the response . See the " List Conversations " docs for details * @ param filters Filter strings to be applied to the visibility of conversations * @ return this to continue building options */ public GetSingleConversationOp...
if ( filters . size ( ) == 1 ) { // Canvas API doesn ' t want the [ ] if it is only one value addSingleItem ( "filter" , filters . get ( 0 ) ) ; } else { optionsMap . put ( "filter[]" , filters ) ; } return this ;
public class JMTimeUtil { /** * Change timestamp to new format with default zone id string . * @ param isoTimestamp the iso timestamp * @ param newFormat the new format * @ return the string */ public static String changeTimestampToNewFormatWithDefaultZoneId ( String isoTimestamp , DateTimeFormatter newFormat ) {...
return changeTimestampToNewFormat ( isoTimestamp , getZoneId ( DEFAULT_ZONE_ID ) , newFormat ) ;
public class ConvexVolumeTool { /** * returns number of points on hull . */ List < Integer > convexhull ( List < Float > pts ) { } }
int npts = pts . size ( ) / 3 ; List < Integer > out = new ArrayList < > ( ) ; // Find lower - leftmost point . int hull = 0 ; for ( int i = 1 ; i < npts ; ++ i ) { float [ ] a = new float [ ] { pts . get ( i * 3 ) , pts . get ( i * 3 + 1 ) , pts . get ( i * 3 + 2 ) } ; float [ ] b = new float [ ] { pts . get ( hull * ...
public class Algebras { /** * TODO : unit test . */ public static double convertAlgebra ( double value , Algebra src , Algebra dst ) { } }
if ( dst . equals ( src ) ) { return value ; } else if ( src . equals ( RealAlgebra . getInstance ( ) ) ) { return dst . fromReal ( value ) ; } else if ( src . equals ( LogSemiring . getInstance ( ) ) ) { return dst . fromLogProb ( value ) ; } else if ( dst . equals ( RealAlgebra . getInstance ( ) ) ) { return src . to...
public class CmsDriverManager { /** * Adds a resource to the given organizational unit . < p > * @ param dbc the current db context * @ param orgUnit the organizational unit to add the resource to * @ param resource the resource that is to be added to the organizational unit * @ throws CmsException if something...
m_monitor . flushCache ( CmsMemoryMonitor . CacheType . HAS_ROLE , CmsMemoryMonitor . CacheType . ROLE_LIST ) ; getUserDriver ( dbc ) . addResourceToOrganizationalUnit ( dbc , orgUnit , resource ) ;
public class UrlSyntaxProviderImpl { /** * Parse the parameter name and the optional portlet window id from a fully qualified query * parameter . */ protected Tuple < String , IPortletWindowId > parsePortletParameterName ( HttpServletRequest request , String name , Set < String > additionalPortletIds ) { } }
// Look for a 2nd separator which might indicate a portlet window id for ( final String additionalPortletId : additionalPortletIds ) { final int windowIdIdx = name . indexOf ( additionalPortletId ) ; if ( windowIdIdx == - 1 ) { continue ; } final String paramName = name . substring ( PORTLET_PARAM_PREFIX . length ( ) +...
public class QueryGenerator { /** * Wraps the query in a nested query when a query is done on a reference entity . Returns the * original query when it is applied to the current entity . */ private QueryBuilder nestedQueryBuilder ( List < Attribute > attributePath , QueryBuilder queryBuilder ) { } }
if ( attributePath . size ( ) == 1 ) { return queryBuilder ; } else if ( attributePath . size ( ) == 2 ) { return QueryBuilders . nestedQuery ( getQueryFieldName ( attributePath . get ( 0 ) ) , queryBuilder , ScoreMode . Avg ) ; } else { throw new UnsupportedOperationException ( CANNOT_FILTER_DEEP_REFERENCE_MSG ) ; }
public class AlarmSchedulerFlusher { /** * / * only exposed for testing not dealing directly with alarm logic */ @ VisibleForTesting boolean scheduleExact ( long interval ) { } }
if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . KITKAT ) { manager . setExact ( AlarmManager . ELAPSED_REALTIME , SystemClock . elapsedRealtime ( ) + interval , pendingIntent ) ; return true ; } return false ;
public class CmsSecurityManager { /** * Adds a resource to the given organizational unit . < p > * @ param context the current request context * @ param orgUnit the organizational unit to add the resource to * @ param resource the resource that is to be added to the organizational unit * @ throws CmsException i...
CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { checkOfflineProject ( dbc ) ; checkRole ( dbc , CmsRole . ADMINISTRATOR . forOrgUnit ( orgUnit . getName ( ) ) ) ; m_driverManager . addResourceToOrgUnit ( dbc , orgUnit , resource ) ; } catch ( Exception e ) { dbc . report ( null , Messages . get...
public class IpCamDeviceRegistry { /** * Is device with given URL registered ? * @ param url the URL used by device * @ return True if device is registered , false otherwise */ public static boolean isRegistered ( URL url ) { } }
if ( url == null ) { throw new IllegalArgumentException ( "Camera device URL cannot be null" ) ; } try { return isRegistered ( url . toURI ( ) ) ; } catch ( URISyntaxException e ) { throw new WebcamException ( e ) ; }
public class PoolOperations { /** * Gets the result of evaluating an automatic scaling formula on the specified * pool . This is primarily for validating an autoscale formula , as it simply * returns the result without applying the formula to the pool . * @ param poolId * The ID of the pool . * @ param autoSc...
return evaluateAutoScale ( poolId , autoScaleFormula , null ) ;
public class Converters { /** * Converts an entity to a DBObject * @ param containingObject The object to convert * @ param mf the MappedField to extract * @ param dbObj the DBObject to populate * @ param opts the options to apply */ public void toDBObject ( final Object containingObject , final MappedField mf ...
final Object fieldValue = mf . getFieldValue ( containingObject ) ; final TypeConverter enc = getEncoder ( fieldValue , mf ) ; final Object encoded = enc . encode ( fieldValue , mf ) ; if ( encoded != null || opts . isStoreNulls ( ) ) { dbObj . put ( mf . getNameToStore ( ) , encoded ) ; }
public class ConfigCheckReport { /** * < pre > * Scope name as key * < / pre > * < code > map & lt ; string , . alluxio . grpc . meta . InconsistentProperties & gt ; errors = 1 ; < / code > */ public java . util . Map < java . lang . String , alluxio . grpc . InconsistentProperties > getErrorsMap ( ) { } }
return internalGetErrors ( ) . getMap ( ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcBuildingElementProxyTypeEnum ( ) { } }
if ( ifcBuildingElementProxyTypeEnumEEnum == null ) { ifcBuildingElementProxyTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 788 ) ; } return ifcBuildingElementProxyTypeEnumEEnum ;
public class OAIResponder { /** * resumptionToken may be null */ private void respondToListRecords ( Map < String , String > args , String baseURL , List < ? > records , ResumptionToken resumptionToken , PrintWriter out ) { } }
appendTop ( out ) ; appendRequest ( args , baseURL , out ) ; out . println ( " <ListRecords>" ) ; for ( int i = 0 ; i < records . size ( ) ; i ++ ) { appendRecord ( " " , ( Record ) records . get ( i ) , out ) ; } appendResumptionToken ( resumptionToken , out ) ; out . println ( " </ListRecords>" ) ; appendBottom ...
public class RandomGUID { /** * Returns a nice neat formatted string . * @ param str * unformatted string * @ return formatted string */ public static String getPrettyFormatted ( String str ) { } }
return String . format ( "%s-%s-%s-%s-%s" , new Object [ ] { str . substring ( 0 , 8 ) , str . substring ( 8 , 12 ) , str . substring ( 12 , 16 ) , str . substring ( 16 , 20 ) , str . substring ( 20 ) } ) ;
public class OptionUtil { /** * If thread number option is true , returns thread number . If false , returns default number . * @ return If true , local mode . */ public int getThreadNumber ( ) { } }
if ( cli . hasOption ( THREAD_NUMBER ) ) { return Integer . valueOf ( cli . getOptionValue ( THREAD_NUMBER ) ) ; } return DEFAULT_THREAD_NUMBER ;
public class UndoManagerImpl { /** * Helper method for reducing code duplication * @ param isChangeAvailable same as ` isUndoAvailable ( ) ` [ Undo ] or ` isRedoAvailable ( ) ` [ Redo ] * @ param changeToApply same as ` invert . apply ( queue . prev ( ) ) ` [ Undo ] or ` queue . next ( ) ` [ Redo ] */ private boole...
if ( isChangeAvailable ) { canMerge = false ; // perform change C change = changeToApply . get ( ) ; this . expectedChange = change ; performingAction . suspendWhile ( ( ) -> apply . accept ( change ) ) ; if ( this . expectedChange != null ) { throw new IllegalStateException ( "Expected change not received:\n" + this ....
public class FileSystem { /** * Make the given filename absolute from the given root if it is not already absolute . * < table border = " 1 " width = " 100 % " summary = " Cases " > * < thead > * < tr > * < td > { @ code filename } < / td > < td > { @ code current } < / td > < td > Result < / td > * < / tr > ...
if ( filename == null ) { return null ; } if ( current != null && ! filename . isAbsolute ( ) ) { try { return new File ( current . getCanonicalFile ( ) , filename . getPath ( ) ) ; } catch ( IOException exception ) { return new File ( current . getAbsoluteFile ( ) , filename . getPath ( ) ) ; } } return filename ;
public class FeatureSet { /** * Returns a feature set combining all the features from { @ code this } and { @ code feature } . */ public FeatureSet with ( Feature feature ) { } }
if ( features . contains ( feature ) ) { return this ; } return new FeatureSet ( add ( features , feature ) ) ;
public class ReflectionCollector { /** * Retrieves key / value pairs from static getters of a class ( get * ( ) or is * ( ) ) . * @ param someClass the class to be inspected . */ private void collectStaticGettersResults ( @ NonNull Class < ? > someClass , @ NonNull JSONObject container ) throws JSONException { } }
final Method [ ] methods = someClass . getMethods ( ) ; for ( final Method method : methods ) { if ( method . getParameterTypes ( ) . length == 0 && ( method . getName ( ) . startsWith ( "get" ) || method . getName ( ) . startsWith ( "is" ) ) && ! "getClass" . equals ( method . getName ( ) ) ) { try { container . put (...
public class ObserverBuilder { /** * Multiple Objects Observer . */ public static < T extends AVObject > CollectionObserver < T > buildSingleObserver ( FindCallback < T > callback ) { } }
return new CollectionObserver < T > ( callback ) ;
public class BasicHttpClient { /** * Returns the response body of the HTTP method , if any , as an { @ link InputStream } . * If response body is not available , returns < tt > null < / tt > * @ return InputStream response body * @ throws HttpException */ public InputStream getResponseBodyAsStream ( ) throws Http...
try { HttpEntity ent = getResponseEntity ( ) ; if ( ent == null ) { return null ; } return ent . getContent ( ) ; } catch ( Throwable t ) { throw new HttpException ( t . getLocalizedMessage ( ) , t ) ; }
public class ReceiveMessageBuilder { /** * Expect a control message in this receive action . * @ param controlMessage * @ return */ public T message ( Message controlMessage ) { } }
StaticMessageContentBuilder staticMessageContentBuilder = StaticMessageContentBuilder . withMessage ( controlMessage ) ; staticMessageContentBuilder . setMessageHeaders ( getMessageContentBuilder ( ) . getMessageHeaders ( ) ) ; getAction ( ) . setMessageBuilder ( staticMessageContentBuilder ) ; return self ;
public class MPPUtility { /** * Utility method to remove ampersands embedded in names . * @ param name name text * @ return name text without embedded ampersands */ public static final String removeAmpersands ( String name ) { } }
if ( name != null ) { if ( name . indexOf ( '&' ) != - 1 ) { StringBuilder sb = new StringBuilder ( ) ; int index = 0 ; char c ; while ( index < name . length ( ) ) { c = name . charAt ( index ) ; if ( c != '&' ) { sb . append ( c ) ; } ++ index ; } name = sb . toString ( ) ; } } return ( name ) ;
public class NanoHTTPD { /** * Override this to customize the server . < p > * ( By default , this delegates to serveFile ( ) and allows directory listing . ) * @ param uriPercent - decoded URI without parameters , for example " / index . cgi " * @ param method " GET " , " POST " etc . * @ param parmsParsed , p...
System . out . println ( method + " '" + uri + "' " ) ; Enumeration < ? > e = header . propertyNames ( ) ; while ( e . hasMoreElements ( ) ) { String value = ( String ) e . nextElement ( ) ; System . out . println ( " HDR: '" + value + "' = '" + header . getProperty ( value ) + "'" ) ; } e = parms . propertyNames ( ) ...
public class JpaPersistence { /** * { @ inheritDoc } */ @ SuppressWarnings ( "rawtypes" ) @ Override public EntityManagerFactory createContainerEntityManagerFactory ( final PersistenceUnitInfo info , final Map map ) { } }
initJpaCounter ( ) ; final PersistenceProvider persistenceProvider = findDelegate ( map ) ; // on surcharge PersistenceUnitInfo . getPersistenceProviderClassName ( ) // pour retourner le PersistenceProvider délégué et pas nous même final PersistenceUnitInfo proxiedInfo = createPersistentUnitInfoProxy ( info , persi...
public class BaseTraceFormatter { /** * Format the given record into the desired trace format * @ param genData GenericData pass information needed * @ return String */ public String traceFormatGenData ( GenericData genData ) { } }
KeyValuePair [ ] pairs = genData . getPairs ( ) ; KeyValuePair kvp = null ; String txt = null ; Integer id = null ; String objId ; Integer levelVal = null ; String name ; String className = null ; String method = null ; String loggerName = null ; Long ibm_datetime = null ; String corrId = null ; String org = null ; Str...
public class WalletService { /** * 如果doTryPay的入参为集成了EasyTransRequest并带有BusinessIdentiffer的话则无需指定cfgClass */ @ Transactional @ EtTcc ( confirmMethod = "doConfirmPay" , cancelMethod = "doCancelPay" , idempotentType = BusinessProvider . IDENPOTENT_TYPE_FRAMEWORK , cfgClass = WalletPayRequestCfg . class ) public WalletPayR...
int update = jdbcTemplate . update ( "update `wallet` set freeze_amount = freeze_amount + ? where user_id = ? and (total_amount - freeze_amount) >= ?;" , param . getPayAmount ( ) , param . getUserId ( ) , param . getPayAmount ( ) ) ; if ( update != 1 ) { throw new RuntimeException ( "can not find specific user id or ha...
public class IpAddress { /** * Create a IpAddressUpdater to execute update . * @ param pathAccountSid The unique sid that identifies this account * @ param pathIpAccessControlListSid The IpAccessControlList Sid that * identifies the IpAddress resources to * update * @ param pathSid A string that identifies th...
return new IpAddressUpdater ( pathAccountSid , pathIpAccessControlListSid , pathSid ) ;
public class GitlabAPI { /** * Get all awards for a merge request * @ param mergeRequest */ public List < GitlabAward > getAllAwards ( GitlabMergeRequest mergeRequest ) { } }
String tailUrl = GitlabProject . URL + "/" + mergeRequest . getProjectId ( ) + GitlabMergeRequest . URL + "/" + mergeRequest . getIid ( ) + GitlabAward . URL + PARAM_MAX_ITEMS_PER_PAGE ; return retrieve ( ) . getAll ( tailUrl , GitlabAward [ ] . class ) ;
public class BusinessUtils { /** * Resolve generics of a class relatively to a superclass . * @ param superType the superclass . * @ param subType the subclass . * @ param < T > the type of the superclass . * @ return the resolved types . */ public static < T > Class < ? > [ ] resolveGenerics ( Class < T > supe...
checkNotNull ( superType , "superType should not be null" ) ; checkNotNull ( subType , "subType should not be null" ) ; Class < ? > subTypeWithoutProxy = ProxyUtils . cleanProxy ( subType ) ; return TypeResolver . resolveRawArguments ( TypeResolver . resolveGenericType ( superType , subTypeWithoutProxy ) , subTypeWitho...
public class LRActivity { /** * Add a verb object to this activity * @ param action The action type of the verb ( required ) * @ param dateStart The start date of the action described * @ param dateEnd The end date of the action described * @ param description An array of descriptions of this action * @ param...
Map < String , Object > container = new HashMap < String , Object > ( ) ; if ( action != null ) { container . put ( "action" , action ) ; } else { return false ; } if ( dateStart != null && dateEnd != null ) { container . put ( "date" , df . format ( dateStart ) + "/" + df . format ( dateEnd ) ) ; } else if ( dateStart...
public class CompressPacketOutputStream { /** * Write an empty packet . * @ throws IOException if socket error occur . */ public void writeEmptyPacket ( ) throws IOException { } }
buf [ 0 ] = ( byte ) 4 ; buf [ 1 ] = ( byte ) 0x00 ; buf [ 2 ] = ( byte ) 0x00 ; buf [ 3 ] = ( byte ) this . compressSeqNo ++ ; buf [ 4 ] = ( byte ) 0x00 ; buf [ 5 ] = ( byte ) 0x00 ; buf [ 6 ] = ( byte ) 0x00 ; buf [ 7 ] = ( byte ) 0x00 ; buf [ 8 ] = ( byte ) 0x00 ; buf [ 9 ] = ( byte ) 0x00 ; buf [ 10 ] = ( byte ) th...
public class AbstractApplicationPage { /** * Closes the given < code > PageComponent < / code > . This method disposes the < code > PageComponent < / code > , triggers all * necessary events ( " focus lost " and " closed " ) , and will activate another < code > PageComponent < / code > ( if there is * one ) . * R...
if ( ! pageComponent . canClose ( ) ) { return false ; } if ( ! pageComponents . contains ( pageComponent ) ) { return false ; } if ( pageComponent == activeComponent ) { fireFocusLost ( pageComponent ) ; activeComponent = null ; } doRemovePageComponent ( pageComponent ) ; pageComponents . remove ( pageComponent ) ; pa...
public class QueryWhere { /** * clear & clone */ public void clear ( ) { } }
this . union = true ; this . type = QueryCriteriaType . NORMAL ; this . ancestry . clear ( ) ; if ( this . criteria != null ) { this . criteria . clear ( ) ; } this . currentCriteria = this . criteria ; this . maxResults = null ; this . offset = null ; this . orderByListId = null ; this . ascOrDesc = null ; this . join...
public class BTCTurkAdapters { /** * Adapts a BTCTurkTicker to a Ticker Object * @ param btcTurkTicker The exchange specific ticker * @ return The ticker */ public static Ticker adaptTicker ( BTCTurkTicker btcTurkTicker ) { } }
CurrencyPair pair = btcTurkTicker . getPair ( ) ; BigDecimal high = btcTurkTicker . getHigh ( ) ; BigDecimal last = btcTurkTicker . getLast ( ) ; Date timestamp = new Date ( btcTurkTicker . getTimestamp ( ) ) ; BigDecimal bid = btcTurkTicker . getBid ( ) ; BigDecimal volume = btcTurkTicker . getVolume ( ) ; BigDecimal ...
public class HighLevelAbstractionFinder { /** * Determines if a list of abstract parameters satisfies a complex * abstraction definition . * @ param def * the { @ link HighLevelAbstractionDefinition } that we ' re looking * for . * @ param potentialInstance * a { @ link List } of { @ link TemporalPropositio...
/* * Loop through the abstraction definition pairs for each defined * relation . If a relation is not found , then set found to false . */ for ( List < TemporalExtendedPropositionDefinition > tepd : epdPairs ) { if ( ! hasRelation ( epdToRelation , potentialInstance , tepd ) ) { return false ; } } return true ;
public class ChronoLocalDateTime { /** * Checks if this date - time is equal to the specified date - time ignoring the chronology . * This method differs from the comparison in { @ link # compareTo } in that it * only compares the underlying date and time and not the chronology . * This allows date - times in dif...
// Do the time check first , it is cheaper than computing EPOCH day . return this . toLocalTime ( ) . toNanoOfDay ( ) == other . toLocalTime ( ) . toNanoOfDay ( ) && this . toLocalDate ( ) . toEpochDay ( ) == other . toLocalDate ( ) . toEpochDay ( ) ;
public class CmsResourceSelectDialog { /** * Creates the resource tree for the given root . < p > * @ param cms the CMS context * @ param root the root resource * @ return the resource tree */ protected CmsResourceTreeTable createTree ( CmsObject cms , CmsResource root ) { } }
return new CmsResourceTreeTable ( cms , root , m_filter ) ;
public class PackageManagerUtils { /** * Checks if the device has a fake touch feature . * @ param manager the package manager . * @ return { @ code true } if the device has a fake touch feature . */ @ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public static boolean hasFakeTouchFeature ( PackageManager manager...
return manager . hasSystemFeature ( PackageManager . FEATURE_FAKETOUCH ) ;
public class RequestEvents { /** * Marks the end of a query identified by the provided correlationId * @ param query - Query data * @ param correlationId - Identifier * @ param type - allows queries to be grouped by type * @ return */ public static < T > RemoveQuery < T > finish ( T query , long correlationId ,...
return new RemoveQuery < > ( RequestData . builder ( ) . query ( query ) . correlationId ( correlationId ) . type ( type ) . build ( ) ) ;
public class Criteria { /** * Adds BETWEEN criteria , * customer _ id between 1 and 10 * @ param attribute The field name to be used * @ param value1 The lower boundary * @ param value2 The upper boundary */ public void addBetween ( Object attribute , Object value1 , Object value2 ) { } }
// PAW // addSelectionCriteria ( ValueCriteria . buildBeweenCriteria ( attribute , value1 , value2 , getAlias ( ) ) ) ; addSelectionCriteria ( ValueCriteria . buildBeweenCriteria ( attribute , value1 , value2 , getUserAlias ( attribute ) ) ) ;
public class ElementList { /** * Renames all subnodes with a certain name * @ param oldName * @ param newName */ public void renameNodesInTree ( String oldName , String newName ) { } }
List < Node > nodes = getNodesFromTreeByName ( oldName ) ; Iterator i = nodes . iterator ( ) ; while ( i . hasNext ( ) ) { Node n = ( Node ) i . next ( ) ; n . setName ( newName ) ; }
public class CommitLogSegmentManager { /** * Resets all the segments , for testing purposes . DO NOT USE THIS OUTSIDE OF TESTS . */ public void resetUnsafe ( ) { } }
logger . debug ( "Closing and clearing existing commit log segments..." ) ; while ( ! segmentManagementTasks . isEmpty ( ) ) Thread . yield ( ) ; for ( CommitLogSegment segment : activeSegments ) segment . close ( ) ; activeSegments . clear ( ) ; for ( CommitLogSegment segment : availableSegments ) segment . close ( ) ...
public class RunJMeterServerMojo { /** * Load the JMeter server * @ throws MojoExecutionException MojoExecutionException */ @ Override public void doExecute ( ) throws MojoExecutionException { } }
getLog ( ) . info ( " " ) ; getLog ( ) . info ( LINE_SEPARATOR ) ; getLog ( ) . info ( " S T A R T I N G J M E T E R S E R V E R " ) ; getLog ( ) . info ( LINE_SEPARATOR ) ; getLog ( ) . info ( String . format ( " Host: %s" , exportedRmiHostname ) ) ; getLog ( ) . info ( String . format ( " Port: %s" , serverPort...
public class EventSourceImpl { /** * The ready state indicates the stream status , Possible values are 0 ( CONNECTING ) , 1 ( OPEN ) and 2 ( CLOSED ) * @ return current state */ public ReadyState getReadyState ( ) { } }
if ( stream == null ) { return EventSource . ReadyState . CONNECTING ; } else { switch ( stream . getReadyState ( ) ) { case CONNECTING : return EventSource . ReadyState . CONNECTING ; case OPEN : return EventSource . ReadyState . OPEN ; case CLOSING : case CLOSED : default : return EventSource . ReadyState . CLOSED ; ...
public class OnDiskSemanticSpace { /** * Loads a vector from the backing semantic space file in { @ code BINARY } * format using the predetermined offet for the word . * @ param word a word in the semantic space * @ return the vector for the word or { @ code null } if the word does not * exist in the semantic s...
Long byteOffset = termToOffset . get ( word ) ; if ( byteOffset == null ) return null ; binarySSpace . seek ( byteOffset ) ; double [ ] vector = new double [ dimensions ] ; for ( int col = 0 ; col < dimensions ; ++ col ) { vector [ col ] = binarySSpace . readDouble ( ) ; } return vector ;
public class POIProxy { /** * This method is used to get the pois from a service and return a list of * { @ link JTSFeature } document with the data retrieved given a bounding box * corners * @ param id * The id of the service * @ param minX * @ param minY * @ param maxX * @ param maxY * @ return A li...
DescribeService describeService = getDescribeServiceByID ( id ) ; return getFeatures ( id , optionalParams , describeService , minX , minY , maxX , maxY , 0 , 0 ) ;