signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class BackendlessSerializer { /** * Returns serialized object from cache or serializes object if it ' s not present in cache . * @ param entityEntryValue object to be serialized * @ return Map formed from given object */ private Object getOrMakeSerializedObject ( Object entityEntryValue , Map < Object , Map ...
if ( serializedCache . containsKey ( entityEntryValue ) ) // cyclic relation { // take from cache and substitute return serializedCache . get ( entityEntryValue ) ; } else // not cyclic relation { // serialize and put into result return serializeToMap ( entityEntryValue , serializedCache ) ; }
public class Resolver { /** * Resolves a subject BelTerm , relationship type , and object BelTerm to a * { @ link KamEdge } , if it exists within the { @ link Kam } . If it does not * exist then a < tt > null < / tt > is returned . * This resolve operation must resolve both the < tt > subjectBelTerm < / tt > and ...
if ( nulls ( kam , kAMStore , subject , r , object , eq ) ) { throw new InvalidArgument ( "null parameter(s) provided to resolve API." ) ; } // resolve subject bel term to kam node . final KamNode subjectKamNode = resolve ( kam , kAMStore , subject , nsmap , eq ) ; if ( subjectKamNode == null ) return null ; // resolve...
public class JSONObject { /** * get JSONArray value . * @ param key key . * @ return value or default value . */ public JSONArray getArray ( String key ) { } }
Object tmp = objectMap . get ( key ) ; return tmp == null ? null : tmp instanceof JSONArray ? ( JSONArray ) tmp : null ;
public class VectorUtil { /** * Compute the dot product of the angle between two vectors . * @ param v1 first vector * @ param v2 second vector * @ return Dot product */ public static double dot ( NumberVector v1 , NumberVector v2 ) { } }
// Java Hotspot appears to optimize these better than if - then - else : return v1 instanceof SparseNumberVector ? v2 instanceof SparseNumberVector ? dotSparse ( ( SparseNumberVector ) v1 , ( SparseNumberVector ) v2 ) : dotSparseDense ( ( SparseNumberVector ) v1 , v2 ) : v2 instanceof SparseNumberVector ? dotSparseDens...
public class OptimizedSIXAResourceProxy { /** * Release a " reader " lock on the close synchronization primative . */ private void releaseCloseLock ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "releaseCloseLock" ) ; closeLock . readLock ( ) . unlock ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "releaseCloseLock" ) ;
public class Base64 { /** * Encode string value into Base64 format . * @ param string string to encode . * @ return given < code > string < / code > value encoded Base64. */ public static String encode ( String string ) { } }
try { return encode ( string . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new BugError ( "JVM with missing support for UTF-8." ) ; }
public class JTSGeometryExpression { /** * Returns a geometric object that represents all Points whose distance from this geometric * object is less than or equal to distance . Calculations are in the spatial reference system * of this geometric object . Because of the limitations of linear interpolation , there wi...
return JTSGeometryExpressions . geometryOperation ( SpatialOps . BUFFER , mixin , ConstantImpl . create ( distance ) ) ;
public class Grid { /** * Converts a { @ link HttpResponse } into a { @ link JSONObject } * @ param resp * A { @ link HttpResponse } obtained from executing a request against a host * @ return An object of type { @ link JSONObject } * @ throws IOException * @ throws JSONException */ private static JSONObject ...
logger . entering ( resp ) ; BufferedReader rd = new BufferedReader ( new InputStreamReader ( resp . getEntity ( ) . getContent ( ) ) ) ; StringBuilder s = new StringBuilder ( ) ; String line ; while ( ( line = rd . readLine ( ) ) != null ) { s . append ( line ) ; } rd . close ( ) ; JSONObject objToReturn = new JSONObj...
public class GenericsResolutionUtils { /** * Resolve type generics by declaration ( as upper bound ) . Used for cases when actual generic definition is not * available ( so actual generics are unknown ) . In most cases such generics resolved as Object * ( for example , { @ code Some < T > } ) . * If class is inne...
// inner class can use outer class generics return fillOuterGenerics ( type , resolveDirectRawGenerics ( type ) , null ) ;
public class ProcComm { /** * Creates a medium settings type for the supplied medium identifier . * @ param id a medium identifier from command line option * @ return medium settings object * @ throws KNXIllegalArgumentException on unknown medium identifier */ private static KNXMediumSettings getMedium ( String i...
if ( id . equals ( "tp0" ) ) return TPSettings . TP0 ; else if ( id . equals ( "tp1" ) ) return TPSettings . TP1 ; else if ( id . equals ( "p110" ) ) return new PLSettings ( false ) ; else if ( id . equals ( "p132" ) ) return new PLSettings ( true ) ; else if ( id . equals ( "rf" ) ) return new RFSettings ( null ) ; el...
public class PythonDistributionAnalyzer { /** * Retrieves the next temporary destination directory for extracting an * archive . * @ return a directory * @ throws AnalysisException thrown if unable to create temporary directory */ private File getNextTempDirectory ( ) throws AnalysisException { } }
File directory ; // getting an exception for some directories not being able to be // created ; might be because the directory already exists ? do { final int dirCount = DIR_COUNT . incrementAndGet ( ) ; directory = new File ( tempFileLocation , String . valueOf ( dirCount ) ) ; } while ( directory . exists ( ) ) ; if ...
public class XMLBuilder { /** * Same as above but with a single attribute name / value pair as well . */ public void addDataElement ( String elemName , String content , String attrName , String attrValue ) { } }
AttributesImpl attrs = new AttributesImpl ( ) ; attrs . addAttribute ( "" , attrName , "" , "CDATA" , attrValue ) ; writeDataElement ( elemName , attrs , content ) ;
public class SerializableUtil { /** * Loads a serialized object of the specifed type from the stream . This * method does not close the stream after reading * @ param file the file from which a mapping should be loaded * @ param type the type of the object being deserialized * @ return the object that was seria...
try { ObjectInputStream inStream = ( stream instanceof ObjectInputStream ) ? ( ObjectInputStream ) stream : new ObjectInputStream ( stream ) ; T object = ( T ) inStream . readObject ( ) ; return object ; } catch ( IOException ioe ) { throw new IOError ( ioe ) ; } catch ( ClassNotFoundException cnfe ) { throw new IOErro...
public class PropertiesHistory { /** * Checks that property reaches given value or makes given transition within given time . * If found , remove old values from history . * @ param property the property name * @ param values the expected property value or values ( transition ) * @ param mustBeAtBegin true if v...
long beginTime_ms = System . currentTimeMillis ( ) ; // begin time long elapsedTime_ms ; // total elapsed time long checkTimeInterval_ms = 100 ; // check every 100 milliseconds LinkedList < TimestampedValue > list = null ; long lastCheckedTimestamp = 0 ; boolean foundMatching = false ; boolean foundNotMatching = false ...
public class JAXBSerialiser { /** * Helper method to get a JAXBSerialiser from a JAXB Context Path ( i . e . a package name or colon - delimited list of package * names ) with the underlying JAXB implementation picked using the default rules for JAXB acquisition < br / > * This is an expensive operation and so the ...
if ( log . isTraceEnabled ( ) ) log . trace ( "Create serialiser for " + contextPath ) ; return new JAXBSerialiser ( contextPath ) ;
public class RandomUtils { /** * Returns a random < code > long < / code > value out of a specified range * @ param lowerBound Lower bound of the target range ( inclusive ) * @ param upperBound Upper bound of the target range ( exclusive ) * @ return A random < code > long < / code > value out of a specified rang...
if ( upperBound < lowerBound ) { throw new IllegalArgumentException ( "lower bound higher than upper bound" ) ; } return lowerBound + ( long ) ( rand . nextDouble ( ) * ( upperBound - lowerBound ) ) ;
public class ExpressionUtil { /** * Input is email template with image tags : * < code > * & lt ; img src = " $ { image : com . centurylink . mdw . base / mdw . png } " alt = " MDW " & gt ; * < / code > * Uses the unqualified image name as its CID . Populates imageMap with results . */ public static String subs...
StringBuffer substituted = new StringBuffer ( input . length ( ) ) ; Matcher matcher = tokenPattern . matcher ( input ) ; int index = 0 ; while ( matcher . find ( ) ) { String match = matcher . group ( ) ; substituted . append ( input . substring ( index , matcher . start ( ) ) ) ; if ( imageMap != null && ( match . st...
public class PropertyManager { /** * Directory where MDW config files can be found . */ public static String getConfigLocation ( ) { } }
if ( configLocation == null ) { String configLoc = System . getProperty ( MDW_CONFIG_LOCATION ) ; if ( configLoc != null ) { if ( ! configLoc . endsWith ( "/" ) ) configLoc = configLoc + "/" ; configLocation = configLoc ; System . out . println ( "Loading configuration files from '" + new File ( configLoc ) . getAbsolu...
public class StepPattern { /** * Execute an expression in the XPath runtime context , and return the * result of the expression . * @ param xctxt The XPath runtime context . * @ param currentNode The currentNode . * @ param dtm The DTM of the current node . * @ param expType The expanded type ID of the curren...
if ( m_whatToShow == NodeTest . SHOW_BYFUNCTION ) { if ( null != m_relativePathPattern ) { return m_relativePathPattern . execute ( xctxt ) ; } else return NodeTest . SCORE_NONE ; } XObject score ; score = super . execute ( xctxt , currentNode , dtm , expType ) ; if ( score == NodeTest . SCORE_NONE ) return NodeTest . ...
public class GetPartitionRequest { /** * The values that define the partition . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setPartitionValues ( java . util . Collection ) } or { @ link # withPartitionValues ( java . util . Collection ) } if you * want ...
if ( this . partitionValues == null ) { setPartitionValues ( new java . util . ArrayList < String > ( partitionValues . length ) ) ; } for ( String ele : partitionValues ) { this . partitionValues . add ( ele ) ; } return this ;
public class UpdatableResultSet { /** * { inheritDoc } . */ public void updateDouble ( int columnIndex , double value ) throws SQLException { } }
checkUpdatable ( columnIndex ) ; parameterHolders [ columnIndex - 1 ] = new DoubleParameter ( value ) ;
public class GetStaticIpsResult { /** * An array of key - value pairs containing information about your get static IPs request . * @ param staticIps * An array of key - value pairs containing information about your get static IPs request . */ public void setStaticIps ( java . util . Collection < StaticIp > staticIp...
if ( staticIps == null ) { this . staticIps = null ; return ; } this . staticIps = new java . util . ArrayList < StaticIp > ( staticIps ) ;
public class CmsJspDateSeriesBean { /** * Returns the next event of this series that takes place at the given date or after it . < p > * In case this is just a single event and not a series , this is identical to the date of the event . < p > * @ param date the date relative to which the event is returned . * @ r...
Date d = toDate ( date ) ; if ( ( d != null ) && ( m_dates != null ) && ( ! m_dates . isEmpty ( ) ) ) { Date lastDate = m_dates . first ( ) ; for ( Date instanceDate : m_dates ) { if ( instanceDate . after ( d ) ) { return new CmsJspInstanceDateBean ( ( Date ) lastDate . clone ( ) , CmsJspDateSeriesBean . this ) ; } la...
public class BaseExchangeRateProvider { /** * Access a { @ link javax . money . convert . ExchangeRate } using the given currencies . The * { @ link javax . money . convert . ExchangeRate } may be , depending on the data provider , eal - time or * deferred . This method should return the rate that is < i > currentl...
return getExchangeRate ( Monetary . getCurrency ( baseCode ) , Monetary . getCurrency ( termCode ) ) ;
public class PersistentState { /** * Turns a temporary snapshot file into a valid snapshot file . * @ param tempFile the temporary file which stores current state . * @ param zxid the last applied zxid for state machine . * @ return the snapshot file . */ File setSnapshotFile ( File tempFile , Zxid zxid ) throws ...
File snapshot = new File ( dataDir , String . format ( "snapshot.%s" , zxid . toSimpleString ( ) ) ) ; LOG . debug ( "Atomically move snapshot file to {}" , snapshot ) ; FileUtils . atomicMove ( tempFile , snapshot ) ; // Since the new snapshot file gets created , we need to fsync the directory . fsyncDirectory ( ) ; r...
public class PhotosCommentsApi { /** * Returns the comments for a photo * < br > * This method does not require authentication . You can choose to sign the call by passing true or false * as the value of the sign parameter . * < br > * @ param photoId ( Required ) The id of the photo to fetch comments for . ...
JinxUtils . validateParams ( photoId ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.photos.comments.getList" ) ; params . put ( "photo_id" , photoId ) ; if ( ! JinxUtils . isNullOrEmpty ( minCommentDate ) ) { params . put ( "min_comment_date" , minCommentDate ) ; } if ( ! J...
public class AbstractClientHttpRequestFactoryWrapper { /** * This implementation simply calls { @ link # createRequest ( URI , HttpMethod , ClientHttpRequestFactory ) } * with the wrapped request factory provided to the * { @ linkplain # AbstractClientHttpRequestFactoryWrapper ( ClientHttpRequestFactory ) construct...
return createRequest ( uri , httpMethod , requestFactory ) ;
public class ExecutionGraph { /** * Returns the a stringified version of the user - defined accumulators . * @ return an Array containing the StringifiedAccumulatorResult objects */ @ Override public StringifiedAccumulatorResult [ ] getAccumulatorResultsStringified ( ) { } }
Map < String , OptionalFailure < Accumulator < ? , ? > > > accumulatorMap = aggregateUserAccumulators ( ) ; return StringifiedAccumulatorResult . stringifyAccumulatorResults ( accumulatorMap ) ;
public class PointerHierarchyRepresentationBuilder { /** * Finalize the result . * @ return Completed result */ public PointerHierarchyRepresentationResult complete ( ) { } }
if ( csize != null ) { csize . destroy ( ) ; csize = null ; } if ( mergecount != ids . size ( ) - 1 ) { LOG . warning ( mergecount + " merges were added to the hierarchy, expected " + ( ids . size ( ) - 1 ) ) ; } if ( prototypes != null ) { return new PointerPrototypeHierarchyRepresentationResult ( ids , parent , paren...
public class ConfigException { /** * For deserialization - uses reflection to set the final origin field on the object */ private static < T > void setOriginField ( T hasOriginField , Class < T > clazz , ConfigOrigin origin ) throws IOException { } }
// circumvent " final " Field f ; try { f = clazz . getDeclaredField ( "origin" ) ; } catch ( NoSuchFieldException e ) { throw new IOException ( clazz . getSimpleName ( ) + " has no origin field?" , e ) ; } catch ( SecurityException e ) { throw new IOException ( "unable to fill out origin field in " + clazz . getSimple...
public class GobblinMetrics { /** * Parse custom { @ link org . apache . gobblin . metrics . Tag } s from property { @ link # METRICS _ STATE _ CUSTOM _ TAGS } * in the input { @ link org . apache . gobblin . configuration . State } . * @ param state { @ link org . apache . gobblin . configuration . State } possibl...
List < Tag < ? > > tags = Lists . newArrayList ( ) ; for ( String tagKeyValue : state . getPropAsList ( METRICS_STATE_CUSTOM_TAGS , "" ) ) { Tag < ? > tag = Tag . fromString ( tagKeyValue ) ; if ( tag != null ) { tags . add ( tag ) ; } } return tags ;
public class LUDecompositor { /** * Returns the result of LU decomposition of given matrix * See < a href = " http : / / mathworld . wolfram . com / LUDecomposition . html " > * http : / / mathworld . wolfram . com / LUDecomposition . html < / a > for more details . * @ return { L , U , P } */ @ Override public M...
Matrix [ ] lup = super . decompose ( ) ; Matrix lu = lup [ 0 ] ; Matrix p = lup [ 1 ] ; Matrix l = matrix . blankOfShape ( lu . rows ( ) , lu . columns ( ) ) ; for ( int i = 0 ; i < l . rows ( ) ; i ++ ) { for ( int j = 0 ; j <= i ; j ++ ) { if ( i > j ) { l . set ( i , j , lu . get ( i , j ) ) ; } else { l . set ( i ,...
public class SearchUrl { /** * Get Resource Url for UpdateSynonymDefinition * @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to retrieve data . Attempting to update data using this parameter ...
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/search/synonyms/{synonymId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "synonymId" , synonymId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlL...
public class BeanELResolver { /** * If the base object is not < code > null < / code > , invoke the method , with the given parameters on * this bean . The return value from the method is returned . * If the base is not < code > null < / code > , the < code > propertyResolved < / code > property of the * < code >...
if ( context == null ) { throw new NullPointerException ( ) ; } Object result = null ; if ( isResolvable ( base ) ) { if ( params == null ) { params = new Object [ 0 ] ; } String name = method . toString ( ) ; Method target = findMethod ( base , name , paramTypes , params . length ) ; if ( target == null ) { throw new ...
public class MoreCollectors { /** * Converts a stream of unicode code points into a String . * < pre > * { @ code * String spacesRemoved = MoreCollectors . codePointsToString ( " a b c " . codePoints ( ) . filter ( c - > c ! = ' ' ) ) ; * Assert . assertEquals ( " abc " , spacesRemoved ) ; ; * < / pre > */ pu...
return codePoints . collect ( StringBuilder :: new , StringBuilder :: appendCodePoint , StringBuilder :: append ) . toString ( ) ;
public class Context { /** * Returns a opened connection resource . If a previous close connection * resource already exists , this already existing connection resource is * returned . * @ return opened connection resource * @ throws EFapsException if connection resource cannot be created */ public static Conne...
Connection con = null ; try { con = Context . DATASOURCE . getConnection ( ) ; con . setAutoCommit ( false ) ; } catch ( final SQLException e ) { throw new EFapsException ( Context . class , "getConnection.SQLException" , e ) ; } return con ;
public class HtmlTemplateCompiler { /** * Called to push a new lexical scope onto the stack . */ private boolean lexicalClimb ( PageCompilingContext pc , Node node ) { } }
if ( node . attr ( ANNOTATION ) . length ( ) > 1 ) { // Setup a new lexical scope ( symbol table changes on each scope encountered ) . if ( REPEAT_WIDGET . equalsIgnoreCase ( node . attr ( ANNOTATION_KEY ) ) || CHOOSE_WIDGET . equalsIgnoreCase ( node . attr ( ANNOTATION_KEY ) ) ) { String [ ] keyAndContent = { node . a...
public class VirtualNetworkGatewaysInner { /** * Deletes the specified virtual network gateway . * @ param resourceGroupName The name of the resource group . * @ param virtualNetworkGatewayName The name of the virtual network gateway . * @ throws IllegalArgumentException thrown if parameters fail the validation ...
beginDeleteWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class BackupDocumentWriter { /** * Append the supplied document to the files . * @ param document the document to be written ; may not be null */ public void write ( Document document ) { } }
assert document != null ; ++ count ; ++ totalCount ; if ( count > maxDocumentsPerFile ) { // Close the stream ( we ' ll open a new one later in the method ) . . . close ( ) ; count = 1 ; } try { if ( stream == null ) { // Open the stream to the next file . . . ++ fileCount ; String suffix = StringUtil . justifyRight ( ...
public class LocalResourcesDownloader { /** * Generates a tmp directory based on : < / br > * TMP _ OS _ DIRECTORY / brooklyn / ENTITY _ ID / RANDOM _ STRING ( 8) * @ return */ public static String findATmpDir ( ) { } }
String osTmpDir = new Os . TmpDirFinder ( ) . get ( ) . get ( ) ; return osTmpDir + File . separator + BROOKLYN_DIR + File . separator + Strings . makeRandomId ( 8 ) ;
public class MediaClient { /** * Creates a water mark and return water mark ID * @ param request The request object containing all options for creating new water mark . * @ return watermarkId the unique ID of the new water mark . */ public CreateWaterMarkResponse createWaterMark ( CreateWaterMarkRequest request ) {...
checkStringNotEmpty ( request . getBucket ( ) , "The parameter bucket should NOT be null or empty string." ) ; checkStringNotEmpty ( request . getKey ( ) , "The parameter key should NOT be null or empty string." ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . POST , request , WATER_MARK ) ; retur...
public class VirtualMachineScaleSetsInner { /** * Gets a list of SKUs available for your VM scale set , including the minimum and maximum VM instances allowed for each SKU . * ServiceResponse < PageImpl1 < VirtualMachineScaleSetSkuInner > > * @ param resourceGroupName The name of the resource group . * ServiceRespo...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( vmScaleSetName == null ) { throw new IllegalArgumentException ( "Parameter vmScaleSetName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == nul...
public class ScriptPluginProviderLoader { /** * Validate provider def */ private static void validateProviderDef ( final ProviderDef pluginDef ) throws PluginException { } }
if ( null == pluginDef . getPluginType ( ) || "" . equals ( pluginDef . getPluginType ( ) ) ) { throw new PluginException ( "Script plugin missing plugin-type" ) ; } if ( "script" . equals ( pluginDef . getPluginType ( ) ) ) { validateScriptProviderDef ( pluginDef ) ; } else if ( "ui" . equals ( pluginDef . getPluginTy...
public class InternalPureXbaseLexer { /** * $ ANTLR start " T _ _ 66" */ public final void mT__66 ( ) throws RecognitionException { } }
try { int _type = T__66 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalPureXbase . g : 64:7 : ( ' for ' ) // InternalPureXbase . g : 64:9 : ' for ' { match ( "for" ) ; } state . type = _type ; state . channel = _channel ; } finally { }
public class InvocationContextImpl { /** * Since some interceptor methods cannot throw ' Exception ' , but the target * method on the bean can throw application exceptions , this method may be * used to unwrap the application exception from either an * InvocationTargetException or UndeclaredThrowableException . ...
Throwable cause = undeclaredException . getCause ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "proceed unwrappering " + undeclaredException . getClass ( ) . getSimpleName ( ) + " : " + cause , cause ) ; // CDI interceptors tend to result in a UndeclaredThrowableExce...
public class JsonWriteContext { /** * Method that writer is to call before it writes a field name . * @ return Index of the field entry ( 0 - based ) */ public final int writeFieldName ( String name ) { } }
if ( _type == TYPE_OBJECT ) { if ( _currentName != null ) { // just wrote a name . . . return STATUS_EXPECT_VALUE ; } _currentName = name ; return ( _index < 0 ) ? STATUS_OK_AS_IS : STATUS_OK_AFTER_COMMA ; } return STATUS_EXPECT_VALUE ;
public class QueryCriterionSerializer { /** * Filter the delimeter from the String array . * remove the String element in the delimeter . * @ param arr * the target array . * @ param delimeter * the delimeter array need to remove . * @ return * the array List . */ private static List < String > filterDeli...
List < String > list = new ArrayList < String > ( ) ; for ( String s : arr ) { if ( s == null || s . isEmpty ( ) ) { continue ; } if ( s . length ( ) > 1 ) { list . add ( s ) ; continue ; } char strChar = s . charAt ( 0 ) ; boolean find = false ; for ( char c : delimeter ) { if ( c == strChar ) { find = true ; break ; ...
public class mps_image { /** * Use this API to fetch filtered set of mps _ image resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static mps_image [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
mps_image obj = new mps_image ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; mps_image [ ] response = ( mps_image [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class ControllerRegistry { /** * Iterate over all registered controllers to get the first suitable one . * @ param jsonPath built JsonPath object mad from request path * @ param method type of a HTTP request * @ return suitable controller */ public Controller getController ( JsonPath jsonPath , String meth...
for ( Controller controller : controllers ) { if ( controller . isAcceptable ( jsonPath , method ) ) { LOGGER . debug ( "using controller {}" , controller ) ; return controller ; } } throw new BadRequestException ( jsonPath + " with method " + method ) ;
public class TypeConstrainedMappingJackson2HttpMessageConverter { /** * ( non - Javadoc ) * @ see org . springframework . http . converter . json . MappingJackson2HttpMessageConverter # canRead ( java . lang . Class , org . springframework . http . MediaType ) */ @ Override public boolean canRead ( Class < ? > clazz ...
return type . isAssignableFrom ( clazz ) && super . canRead ( clazz , mediaType ) ;
public class StaticFilesResource { /** * Completes with { @ code Ok } and the file content or { @ code NotFound } . * @ param contentFile the String name of the content file to be served * @ param root the String root path of the static content * @ param validSubPaths the String indicating the valid file paths un...
if ( rootPath == null ) { final String slash = root . endsWith ( "/" ) ? "" : "/" ; rootPath = root + slash ; } final String contentPath = rootPath + context . request . uri ; try { final byte [ ] fileContent = readFile ( contentPath ) ; completes ( ) . with ( Response . of ( Ok , Body . from ( fileContent , Body . Enc...
public class FactorGraph { /** * Gets the factor in this named { @ code name } . Returns { @ code null } * if no such factor exists . * @ param name * @ return */ public Factor getFactorByName ( String name ) { } }
int index = getFactorIndexByName ( name ) ; if ( index == - 1 ) { return null ; } return factors [ index ] ;
public class CmsObject { /** * Returns a set of principals that are responsible for a specific resource . < p > * @ param resource the resource to get the responsible principals from * @ return the set of principals that are responsible for a specific resource * @ throws CmsException if something goes wrong */ pu...
return m_securityManager . readResponsiblePrincipals ( m_context , resource ) ;
public class HtmlTree { /** * Generates a UL tag with the style class attribute and some content . * @ param styleClass style for the tag * @ param first initial content to be added * @ param more a series of additional content nodes to be added * @ return an HtmlTree object for the UL tag */ public static Html...
HtmlTree htmlTree = new HtmlTree ( HtmlTag . UL ) ; htmlTree . addContent ( nullCheck ( first ) ) ; for ( Content c : more ) { htmlTree . addContent ( nullCheck ( c ) ) ; } htmlTree . addStyle ( nullCheck ( styleClass ) ) ; return htmlTree ;
public class Table { /** * Removes all columns except for those given in the argument from this table */ public Table retainColumns ( String ... columnNames ) { } }
List < Column < ? > > retained = columns ( columnNames ) ; columnList . clear ( ) ; columnList . addAll ( retained ) ; return this ;
public class PayloadStorage { /** * Downloads the payload from the given uri . * @ param uri the location from where the object is to be downloaded * @ return an inputstream of the payload in the external storage * @ throws ConductorClientException if the download fails due to an invalid path or an error from ext...
HttpURLConnection connection = null ; String errorMsg ; try { URL url = new URI ( uri ) . toURL ( ) ; connection = ( HttpURLConnection ) url . openConnection ( ) ; connection . setDoOutput ( false ) ; // Check the HTTP response code int responseCode = connection . getResponseCode ( ) ; if ( responseCode == HttpURLConne...
public class Repositories { /** * Sets all repositories whether is writable with the specified flag . * @ param writable the specified flat , { @ code true } for writable , { @ code false } otherwise */ public static void setRepositoriesWritable ( final boolean writable ) { } }
for ( final Map . Entry < String , Repository > entry : REPOS_HOLDER . entrySet ( ) ) { final String repositoryName = entry . getKey ( ) ; final Repository repository = entry . getValue ( ) ; repository . setWritable ( writable ) ; LOGGER . log ( Level . INFO , "Sets repository[name={0}] writable[{1}]" , new Object [ ]...
public class Index { /** * { @ inheritDoc } */ @ Override public String build ( ) { } }
StringBuilder sb = new StringBuilder ( ) ; sb . append ( "CREATE CUSTOM INDEX " ) ; sb . append ( name ) . append ( " " ) ; String fullTable = keyspace == null ? table : keyspace + "." + table ; sb . append ( String . format ( "ON %s(%s) " , fullTable , column == null ? "" : column ) ) ; sb . append ( "USING 'com.strat...
public class VirtualCdj { /** * Controls the tempo at which we report ourselves to be playing . Only meaningful if we are sending status packets . * If { @ link # isSynced ( ) } is { @ code true } and we are not the tempo master , any value set by this method will * overridden by the the next tempo master change . ...
if ( bpm == 0.0 ) { throw new IllegalArgumentException ( "Tempo cannot be zero." ) ; } final double oldTempo = metronome . getTempo ( ) ; metronome . setTempo ( bpm ) ; notifyBeatSenderOfChange ( ) ; if ( isTempoMaster ( ) && ( Math . abs ( bpm - oldTempo ) > getTempoEpsilon ( ) ) ) { deliverTempoChangedAnnouncement ( ...
public class BrowserPane { /** * Initial settings */ protected void init ( ) { } }
// " support for SSL " String handlerPkgs = System . getProperty ( "java.protocol.handler.pkgs" ) ; if ( ( handlerPkgs != null ) && ! ( handlerPkgs . isEmpty ( ) ) ) { handlerPkgs = handlerPkgs + "|com.sun.net.ssl.internal.www.protocol" ; } else { handlerPkgs = "com.sun.net.ssl.internal.www.protocol" ; } System . setPr...
public class VersionHistory { /** * endregion */ public void updateVersionHistory ( double timestamp , Integer newVersionCode , String newVersionName ) { } }
boolean exists = false ; for ( VersionHistoryItem item : versionHistoryItems ) { if ( item . getVersionCode ( ) == newVersionCode && item . getVersionName ( ) . equals ( newVersionName ) ) { exists = true ; break ; } } if ( ! exists ) { VersionHistoryItem newVersionHistoryItem = new VersionHistoryItem ( timestamp , new...
public class DateUtils { /** * # func 获取当前时间当月的第一天 < br > * @ author dongguoshuang */ public static Date getFirstDayOfMonth ( Date date ) { } }
Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( date ) ; int firstDay = calendar . getActualMinimum ( Calendar . DAY_OF_MONTH ) ; return org . apache . commons . lang . time . DateUtils . setDays ( date , firstDay ) ;
public class Formatter { /** * 格式化为货币字符串 * @ param locale { @ link Locale } , 比如 : { @ link Locale # CHINA } * @ param number 数字 * @ return 货币字符串 * @ since 1.0.9 */ public static String toCurrency ( Locale locale , double number ) { } }
return NumberFormat . getCurrencyInstance ( locale ) . format ( number ) ;
public class AbstractCompactSimpleNondet { /** * public void setTransitions ( int state , int inputIdx , TIntCollection successors ) { */ public void setTransitions ( int state , int inputIdx , Collection < ? extends Integer > successors ) { } }
// TODO : replace by primitive specialization int transIdx = toMemoryIndex ( state , inputIdx ) ; // TIntSet succs = transitions [ transIdx ] ; Set < Integer > succs = transitions [ transIdx ] ; // TODO : replace by primitive specialization if ( succs == null ) { // succs = new TIntHashSet ( successors ) ; succs = Sets...
public class AbstractControllerServer { /** * @ param scope * @ param participantConfig * @ throws InitializationException * @ throws InterruptedException */ public void init ( final Scope scope , final ParticipantConfig participantConfig ) throws InitializationException , InterruptedException { } }
manageLock . lockWrite ( this ) ; try { final boolean alreadyActivated = isActive ( ) ; ParticipantConfig internalParticipantConfig = participantConfig ; if ( scope == null ) { throw new NotAvailableException ( "scope" ) ; } // check if this instance was partly or fully initialized before . if ( initialized | informerW...
public class ExperimentUUID { /** * setter for uuid - sets * @ generated */ public void setUuid ( String v ) { } }
if ( ExperimentUUID_Type . featOkTst && ( ( ExperimentUUID_Type ) jcasType ) . casFeat_uuid == null ) jcasType . jcas . throwFeatMissing ( "uuid" , "edu.cmu.lti.oaqa.framework.types.ExperimentUUID" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( ExperimentUUID_Type ) jcasType ) . casFeatCode_uuid , v ) ;
public class MongoDBUtils { /** * Populate compound key . * @ param dbObj * the db obj * @ param m * the m * @ param metaModel * the meta model * @ param id * the id */ public static void populateCompoundKey ( DBObject dbObj , EntityMetadata m , MetamodelImpl metaModel , Object id ) { } }
EmbeddableType compoundKey = metaModel . embeddable ( m . getIdAttribute ( ) . getBindableJavaType ( ) ) ; // Iterator < Attribute > iter = compoundKey . getAttributes ( ) . iterator ( ) ; BasicDBObject compoundKeyObj = new BasicDBObject ( ) ; compoundKeyObj = getCompoundKeyColumns ( m , id , compoundKey , metaModel ) ...
public class JCudaDriver { /** * Maps an OpenGL buffer object . * < pre > * CUresult cuGLMapBufferObject ( * CUdeviceptr * dptr , * size _ t * size , * GLuint buffer ) * < / pre > * < div > * < p > Maps an OpenGL buffer object . * Deprecated < span > This function is * deprecated as of Cuda 3.0 . < ...
return checkResult ( cuGLMapBufferObjectNative ( dptr , size , bufferobj ) ) ;
public class RestNodeTypeHandlerImpl { /** * Imports a CND file into the repository , providing that the repository ' s { @ link javax . jcr . nodetype . NodeTypeManager } is a valid ModeShape * node type manager . * @ param request a non - null { @ link Request } * @ param repositoryName a non - null , URL encod...
CheckArg . isNotNull ( cndInputStream , "request body" ) ; Session session = getSession ( request , repositoryName , workspaceName ) ; NodeTypeManager nodeTypeManager = session . getWorkspace ( ) . getNodeTypeManager ( ) ; if ( ! ( nodeTypeManager instanceof org . modeshape . jcr . api . nodetype . NodeTypeManager ) ) ...
public class BigMoney { /** * Obtains an instance of { @ code BigMoney } from a { @ code BigDecimal } at a specific scale . * This allows you to create an instance with a specific currency and amount . * No rounding is performed on the amount , so it must have a * scale less than or equal to the new scale . * T...
return BigMoney . ofScale ( currency , amount , scale , RoundingMode . UNNECESSARY ) ;
public class Utils { /** * Text is truncated if exceed field capacity . Uses spaces as padding * @ param text the text to write * @ param characterSetName The charset to use * @ param length field length * @ param alignment where to align the data * @ param paddingByte the byte to use for padding * @ return...
DBFAlignment align = DBFAlignment . RIGHT ; if ( alignment == ALIGN_LEFT ) { align = DBFAlignment . LEFT ; } return textPadding ( text , characterSetName , length , align , paddingByte ) ;
public class MappingFilterParser { /** * C : \ \ Project \ \ Obdalib \ \ obdalib - parent \ \ obdalib - core \ \ src \ \ main \ \ java \ \ it \ \ unibz \ \ inf \ \ obda \ \ gui \ \ swing \ \ utils \ \ MappingFilter . g : 42:1 : parse returns [ ArrayList < TreeModelFilter < OBDAMappingAxiom > > filterList ] : f1 = filte...
ArrayList < TreeModelFilter < SQLPPTriplesMap > > filterList = null ; TreeModelFilter < SQLPPTriplesMap > f1 = null ; TreeModelFilter < SQLPPTriplesMap > f2 = null ; filterList = new ArrayList < TreeModelFilter < SQLPPTriplesMap > > ( ) ; try { // C : \ \ Project \ \ Obdalib \ \ obdalib - parent \ \ obdalib - core \ \ ...
public class ColumnMaskedMatrix { /** * { @ inheritDoc } */ public void setRow ( int row , DoubleVector values ) { } }
if ( values . length ( ) != columns ) throw new IllegalArgumentException ( "cannot set a row " + "whose dimensions are different than the matrix" ) ; if ( values instanceof SparseVector ) { SparseVector sv = ( SparseVector ) values ; for ( int nz : sv . getNonZeroIndices ( ) ) backingMatrix . set ( nz , getRealColumn (...
public class AggregatePlanNode { /** * Add an aggregate to this plan node . * @ param aggType * @ param isDistinct Is distinct being applied to the argument of this aggregate ? * @ param aggOutputColumn Which output column in the output schema this * aggregate should occupy * @ param aggInputExpr The input ex...
m_aggregateTypes . add ( aggType ) ; if ( isDistinct ) { m_aggregateDistinct . add ( 1 ) ; } else { m_aggregateDistinct . add ( 0 ) ; } m_aggregateOutputColumns . add ( aggOutputColumn ) ; if ( aggType . isNullary ( ) ) { assert ( aggInputExpr == null ) ; m_aggregateExpressions . add ( null ) ; } else { assert ( aggInp...
public class CmsImportVersion7 { /** * Sets the aceFlags . < p > * @ param aceFlags the aceFlags to set * @ see # N _ FLAGS * @ see # addResourceAceRules ( Digester , String ) */ public void setAceFlags ( String aceFlags ) { } }
try { m_aceFlags = Integer . parseInt ( aceFlags ) ; } catch ( Throwable e ) { m_throwable = e ; }
public class ApiOvhRouter { /** * Accept , reject or cancel a pending request * REST : POST / router / { serviceName } / privateLink / { peerServiceName } / request / manage * @ param action [ required ] * @ param serviceName [ required ] The internal name of your Router offer * @ param peerServiceName [ requir...
String qPath = "/router/{serviceName}/privateLink/{peerServiceName}/request/manage" ; StringBuilder sb = path ( qPath , serviceName , peerServiceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "action" , action ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ...
public class Variable { /** * Gets the term of the given name . * @ param name is the name of the term to retrieve * @ return the term of the given name */ public Term getTerm ( String name ) { } }
for ( Term term : this . terms ) { if ( name . equals ( term . getName ( ) ) ) { return term ; } } return null ;
public class AmazonIdentityManagementClient { /** * Lists the IAM groups that the specified IAM user belongs to . * You can paginate the results using the < code > MaxItems < / code > and < code > Marker < / code > parameters . * @ param listGroupsForUserRequest * @ return Result of the ListGroupsForUser operatio...
request = beforeClientExecution ( request ) ; return executeListGroupsForUser ( request ) ;
public class AbstractResourceServices { /** * Trivial implementation that does * not * leverage bootstrap validation nor caching */ @ Override public ResourceReferenceFactory < Object > registerResourceInjectionPoint ( final InjectionPoint injectionPoint ) { } }
return new ResourceReferenceFactory < Object > ( ) { @ Override public ResourceReference < Object > createResource ( ) { return new SimpleResourceReference < Object > ( resolveResource ( injectionPoint ) ) ; } } ;
public class BoosterParms { /** * Iterates over a set of parameters and applies locale - specific formatting * to decimal ones ( Floats and Doubles ) . * @ param params Parameters to localize * @ return Map with localized parameter values */ private static Map < String , Object > localizeDecimalParams ( final Map...
Map < String , Object > localized = new HashMap < > ( params . size ( ) ) ; final NumberFormat localizedNumberFormatter = DecimalFormat . getNumberInstance ( ) ; for ( String key : params . keySet ( ) ) { final Object value = params . get ( key ) ; final Object newValue ; if ( value instanceof Float || value instanceof...
public class PerformanceListenerStoreImpl { /** * { @ inheritDoc } * After { @ link # optimizeGet ( ) } has been called , this method will return * instances of { @ link CopyOnWriteArrayList } . */ @ Override protected < T > List < T > createListenerList ( int sizeHint ) { } }
if ( this . optimized ) { return new CopyOnWriteArrayList < > ( ) ; } return super . createListenerList ( sizeHint ) ;
public class ActorToolbar { /** * Use this method to colorize toolbar icons to the desired target color * @ param toolbarView toolbar view being colored * @ param toolbarIconsColor the target color of toolbar icons * @ param activity reference to activity needed to register observers */ public static void coloriz...
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter ( toolbarIconsColor , PorterDuff . Mode . SRC_IN ) ; for ( int i = 0 ; i < toolbarView . getChildCount ( ) ; i ++ ) { final View v = toolbarView . getChildAt ( i ) ; doColorizing ( v , colorFilter , toolbarIconsColor ) ; } // Step 3 : Changing the colo...
public class HBaseClient { /** * ( non - Javadoc ) * @ see com . impetus . kundera . client . Client # findIdsByColumn ( java . lang . String , * java . lang . String , java . lang . String , java . lang . Object , java . lang . Class ) */ @ Override public Object [ ] findIdsByColumn ( String schemaName , String ta...
EntityMetadata m = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , entityClazz ) ; byte [ ] valueInBytes = HBaseUtils . getBytes ( columnValue ) ; Filter f = new SingleColumnValueFilter ( Bytes . toBytes ( tableName ) , Bytes . toBytes ( columnName ) , CompareOp . EQUAL , valueInBytes ) ; KeyOnlyFilter k...
public class StrBuilder { /** * Calls { @ link String # format ( String , Object . . . ) } and appends the result . * @ param format the format string * @ param objs the objects to use in the format string * @ return { @ code this } to enable chaining * @ see String # format ( String , Object . . . ) * @ sinc...
return append ( String . format ( format , objs ) ) ;
public class Types { /** * Return first abstract member of class ` sym ' . */ public MethodSymbol firstUnimplementedAbstract ( ClassSymbol sym ) { } }
try { return firstUnimplementedAbstractImpl ( sym , sym ) ; } catch ( CompletionFailure ex ) { chk . completionError ( enter . getEnv ( sym ) . tree . pos ( ) , ex ) ; return null ; }
public class CPRuleUserSegmentRelPersistenceImpl { /** * Returns the last cp rule user segment rel in the ordered set where commerceUserSegmentEntryId = & # 63 ; . * @ param commerceUserSegmentEntryId the commerce user segment entry ID * @ param orderByComparator the comparator to order the set by ( optionally < co...
CPRuleUserSegmentRel cpRuleUserSegmentRel = fetchByCommerceUserSegmentEntryId_Last ( commerceUserSegmentEntryId , orderByComparator ) ; if ( cpRuleUserSegmentRel != null ) { return cpRuleUserSegmentRel ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerce...
public class PlantUmlVerbatimSerializer { /** * Register an instance of { @ link PlantUmlVerbatimSerializer } in the given serializer ' s map . */ public static void addToMap ( final Map < String , VerbatimSerializer > serializerMap ) { } }
PlantUmlVerbatimSerializer serializer = new PlantUmlVerbatimSerializer ( ) ; for ( Type type : Type . values ( ) ) { String name = type . getName ( ) ; serializerMap . put ( name , serializer ) ; }
public class ExpandableButtonMenu { /** * Inflates the view */ private void inflate ( ) { } }
( ( LayoutInflater ) getContext ( ) . getSystemService ( Context . LAYOUT_INFLATER_SERVICE ) ) . inflate ( R . layout . ebm__menu , this , true ) ; mOverlay = findViewById ( R . id . ebm__menu_overlay ) ; mMidContainer = findViewById ( R . id . ebm__menu_middle_container ) ; mLeftContainer = findViewById ( R . id . ebm...
public class ArmeriaConfigurationUtil { /** * Parses the data size text as a decimal { @ code long } . * @ param dataSizeText the data size text , i . e . { @ code 1 } , { @ code 1B } , { @ code 1KB } , { @ code 1MB } , * { @ code 1GB } or { @ code 1TB } */ public static long parseDataSize ( String dataSizeText ) {...
requireNonNull ( dataSizeText , "text" ) ; final Matcher matcher = DATA_SIZE_PATTERN . matcher ( dataSizeText ) ; checkArgument ( matcher . matches ( ) , "Invalid data size text: %s (expected: %s)" , dataSizeText , DATA_SIZE_PATTERN ) ; final long unit ; final String unitText = matcher . group ( 2 ) ; if ( Strings . is...
public class StringIterate { /** * For each int code point in the { @ code string } in reverse order , execute the { @ link CodePointProcedure } . * @ deprecated since 7.0 . Use { @ link # reverseForEachCodePoint ( String , CodePointProcedure ) } instead . */ @ Deprecated public static void reverseForEach ( String st...
StringIterate . reverseForEachCodePoint ( string , procedure ) ;
public class Reductions { /** * Reduces an array of elements using the passed function . * @ param < E > the element type parameter * @ param < R > the result type parameter * @ param array the array to be consumed * @ param function the reduction function * @ param init the initial value for reductions * @...
return new Reductor < > ( function , init ) . apply ( new ArrayIterator < E > ( array ) ) ;
public class VitalTransformer { /** * Retrieve the payload from storage and return as a byte array . * @ param object Our digital object . * @ param pid The payload ID to retrieve . * @ return byte [ ] The byte array containing payload data * @ throws Exception on any errors */ private byte [ ] getBytes ( Digit...
// These can happily throw exceptions higher Payload payload = object . getPayload ( pid ) ; InputStream in = payload . open ( ) ; byte [ ] result = null ; // But here , the payload must receive // a close before throwing the error try { result = IOUtils . toByteArray ( in ) ; } catch ( Exception ex ) { throw ex ; } fi...
public class EditScript { /** * { @ inheritDoc } */ @ Override public Diff next ( ) { } }
if ( mIndex < mChanges . size ( ) ) { return mChanges . get ( mIndex ++ ) ; } else { throw new NoSuchElementException ( "No more elements in the change list!" ) ; }
public class KinesisActionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( KinesisAction kinesisAction , ProtocolMarshaller protocolMarshaller ) { } }
if ( kinesisAction == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( kinesisAction . getRoleArn ( ) , ROLEARN_BINDING ) ; protocolMarshaller . marshall ( kinesisAction . getStreamName ( ) , STREAMNAME_BINDING ) ; protocolMarshaller . marsha...
public class MvpLceFragment { /** * Create the loading view . Default is { @ code findViewById ( R . id . loadingView ) } * @ param view The main view returned from { @ link # onCreateView ( LayoutInflater , ViewGroup , * Bundle ) } * @ return the loading view */ @ NonNull protected View createLoadingView ( View vi...
return view . findViewById ( R . id . loadingView ) ;
public class NewRelicMeterRegistry { /** * VisibleForTesting */ Stream < String > writeGauge ( Gauge gauge ) { } }
Double value = gauge . value ( ) ; if ( Double . isFinite ( value ) ) { return Stream . of ( event ( gauge . getId ( ) , new Attribute ( "value" , value ) ) ) ; } return Stream . empty ( ) ;
public class BraveSpan { /** * Converts a map to a string of form : " key1 = value1 key2 = value2" */ static String toAnnotation ( Map < String , ? > fields ) { } }
// special - case the " event " field which is similar to the semantics of a zipkin annotation Object event = fields . get ( "event" ) ; if ( event != null && fields . size ( ) == 1 ) return event . toString ( ) ; return joinOnEqualsSpace ( fields ) ;
public class AuthorizedList { /** * Adds a resource that the user should be allowed to access * @ param theResources The resource names , e . g . " Patient / 123 " ( in this example the user would be allowed to access Patient / 123 but not Observations where Observation . subject = " Patient / 123 " m , etc . * @ r...
Validate . notNull ( theResources , "theResources must not be null" ) ; for ( String next : theResources ) { addResource ( next ) ; } return this ;
public class JobInProgress { /** * Return a MapTask , if appropriate , to run on the given tasktracker */ public synchronized Task obtainNewMapTask ( TaskTrackerStatus tts , int clusterSize , int numUniqueHosts , int maxCacheLevel ) throws IOException { } }
if ( status . getRunState ( ) != JobStatus . RUNNING ) { LOG . info ( "Cannot create task split for " + profile . getJobID ( ) ) ; return null ; } int target = findNewMapTask ( tts , clusterSize , numUniqueHosts , maxCacheLevel ) ; if ( target == - 1 ) { return null ; } Task result = maps [ target ] . getTaskToRun ( tt...
public class StereoTool { /** * Checks these 7 atoms to see if they are at the points of an octahedron . * @ param atomA one of the axial atoms * @ param atomB the central atom * @ param atomC one of the equatorial atoms * @ param atomD one of the equatorial atoms * @ param atomE one of the equatorial atoms ...
Point3d pointA = atomA . getPoint3d ( ) ; Point3d pointB = atomB . getPoint3d ( ) ; Point3d pointC = atomC . getPoint3d ( ) ; Point3d pointD = atomD . getPoint3d ( ) ; Point3d pointE = atomE . getPoint3d ( ) ; Point3d pointF = atomF . getPoint3d ( ) ; Point3d pointG = atomG . getPoint3d ( ) ; // the points on the axis ...