signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JcrSession { /** * Returns whether the authenticated user has the given role . * @ param context the security context * @ param roleName the name of the role to check * @ param repositoryName the name of the repository * @ param workspaceName the workspace under which the user must have the role . ...
if ( context . hasRole ( roleName ) ) return true ; roleName = roleName + "." + repositoryName ; if ( context . hasRole ( roleName ) ) return true ; roleName = roleName + "." + workspaceName ; return context . hasRole ( roleName ) ;
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcBurnerTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class LanguageUtils { /** * Returns a map of all translations for a given language . * Defaults to the default language which must be set . * @ param appid appid name of the { @ link com . erudika . para . core . App } * @ param langCode the 2 - letter language code * @ return the language map */ public ...
if ( StringUtils . isBlank ( langCode ) || langCode . equals ( getDefaultLanguageCode ( ) ) ) { return getDefaultLanguage ( appid ) ; } else if ( langCode . length ( ) > 2 && ! ALL_LOCALES . containsKey ( langCode ) ) { return readLanguage ( appid , langCode . substring ( 0 , 2 ) ) ; } else if ( LANG_CACHE . containsKe...
public class FormattedString { /** * Creates a FormattedString for each of the given objects . */ public static List < FormattedString > of ( String format , List < ? > objects ) { } }
return objects . stream ( ) . map ( object -> of ( format , object ) ) . collect ( toList ( ) ) ;
public class FileSystem { /** * Filter files / directories in the given list of paths using user - supplied * path filter . * If one of the user supplied directory does not exist , the method silently * skips it and continues with the remaining directories . * @ param files * a list of paths * @ param filte...
ArrayList < FileStatus > results = new ArrayList < FileStatus > ( ) ; for ( int i = 0 ; i < files . length ; i ++ ) { try { listStatus ( results , files [ i ] , filter ) ; } catch ( FileNotFoundException e ) { LOG . info ( "Parent path doesn't exist: " + e . getMessage ( ) ) ; } } return results . toArray ( new FileSta...
public class BusItinerary { /** * Replies the list of the bus halts of the bus itinerary . * @ return a list of bus halts */ @ Pure public Iterator < BusItineraryHalt > busHaltIterator ( ) { } }
return Iterators . concat ( this . validHalts . iterator ( ) , this . invalidHalts . iterator ( ) ) ;
public class ValueHolder { /** * Factory method to construct an instance of the ValueHolder class with a Comparable value . The ValueHolder * implementation itself implements the Comparable interface . * @ param < T > the Class type of the Comparable value . * @ param value the Comparable value to hold . * @ re...
return new ComparableValueHolder < > ( value ) ;
public class ExpressionUtils { /** * Returns whether the given character is a Unicode symbol */ static boolean isSymbolChar ( int ch ) { } }
int t = Character . getType ( ch ) ; return t == Character . MATH_SYMBOL || t == Character . CURRENCY_SYMBOL || t == Character . MODIFIER_SYMBOL || t == Character . OTHER_SYMBOL ;
public class GermanSpellerRule { /** * non - native speakers and cannot be found by just looking for similar words . */ @ Nullable private String getParticipleSuggestion ( String word ) { } }
if ( word . startsWith ( "ge" ) && word . endsWith ( "t" ) ) { // strip leading " ge " and replace trailing " t " with " en " : String baseform = word . substring ( 2 , word . length ( ) - 1 ) + "en" ; try { String participle = getParticipleForBaseform ( baseform ) ; if ( participle != null ) { return participle ; } } ...
public class MvpProcessor { /** * < p > Gets presenters { @ link java . util . List } annotated with { @ link com . arellomobile . mvp . presenter . InjectPresenter } for view . < / p > * < p > See full info about getting presenter instance in { @ link # getMvpPresenter } < / p > * @ param delegated class contains ...
if ( ! hasMoxyReflector ( ) ) { return Collections . emptyList ( ) ; } @ SuppressWarnings ( "unchecked" ) Class < ? super Delegated > aClass = ( Class < Delegated > ) delegated . getClass ( ) ; List < Object > presenterBinders = null ; while ( aClass != Object . class && presenterBinders == null ) { presenterBinders = ...
public class TrueTypeFontUnicode { /** * Outputs to the writer the font dictionaries and streams . * @ param writer the writer for this document * @ param ref the font indirect reference * @ param params several parameters that depend on the font type * @ throws IOException on error * @ throws DocumentExcepti...
HashMap longTag = ( HashMap ) params [ 0 ] ; addRangeUni ( longTag , true , subset ) ; Object metrics [ ] = longTag . values ( ) . toArray ( ) ; Arrays . sort ( metrics , this ) ; PdfIndirectReference ind_font = null ; PdfObject pobj = null ; PdfIndirectObject obj = null ; PdfIndirectReference cidset = null ; if ( writ...
public class LocalCachedMapOptions { /** * Sets time to live for each map entry in local cache . * If value equals to < code > 0 < / code > then timeout is not applied * @ param timeToLive - time to live * @ param timeUnit - time unit * @ return LocalCachedMapOptions instance */ public LocalCachedMapOptions < K...
return timeToLive ( timeUnit . toMillis ( timeToLive ) ) ;
public class Transaction { /** * Closes the transaction . If the transaction has not been committed , * it is rolled back . */ public void close ( ) { } }
try { state = "CLOSING" ; if ( connection != null ) { logger . warn ( "Connection not committed, rolling back." ) ; rollback ( ) ; } if ( ! events . empty ( ) ) { state = "CLOSING EVENTS" ; do { Execution exec = ( Execution ) events . pop ( ) ; try { Stack < Execution > stack ; exec . close ( ) ; stack = eventCache . g...
public class DescribeNetworkInterfacesRequest { /** * One or more network interface IDs . * Default : Describes all your network interfaces . * @ return One or more network interface IDs . < / p > * Default : Describes all your network interfaces . */ public java . util . List < String > getNetworkInterfaceIds ( ...
if ( networkInterfaceIds == null ) { networkInterfaceIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return networkInterfaceIds ;
public class GBSInsertFringe { /** * Balance a fringe with a K factor of sixteen . * @ param stack The stack of nodes through which the insert operation * passed . * @ param bparent The parent of the fringe balance point . * @ param fpoint The fringe balance point ( the top of the fringe ) . * @ param fpidx T...
/* k = 16 , 2k - 1 = 31 , k - 1 = 15 [ A - B - C - D - E - F - G - H - I - J - K - L - M - N - O ] [ 15 children ] becomes : * - - - D - - - * * - - - L - - - * * - B - * * - F - * * - J - * * - N - * A C E G I K M O * - - - D - - - * * - - - L - - - * * - B - * * - F - * * - J - * * - N - * [ 17 children...
public class MDLRXNReader { /** * Read a Reaction from a file in MDL RXN format * @ return The Reaction that was read from the MDL file . */ private IReaction readReaction ( IChemObjectBuilder builder ) throws CDKException { } }
logger . debug ( "Reading new reaction" ) ; int linecount = 0 ; IReaction reaction = builder . newInstance ( IReaction . class ) ; try { input . readLine ( ) ; // first line should be $ RXN input . readLine ( ) ; // second line input . readLine ( ) ; // third line input . readLine ( ) ; // fourth line } catch ( IOExcep...
public class AbstractObjectStore { /** * Print a dump of the state . * @ param printWriter to be written to . */ public void print ( java . io . PrintWriter printWriter ) { } }
printWriter . println ( "State Dump for:" + cclass . getName ( ) + " sequenceNumber=" + sequenceNumber + "(int)" + " allocationAllowed=" + allocationAllowed + "(boolean)" + " storeName=" + storeName + "(String)" + "\n objectStoreIdentifier=" + objectStoreIdentifier + "(int)" + " storeStrategy=" + storeStrategy + "(int)...
public class ConstructorInstrumenter { /** * Bytecode is rewritten to invoke this method ; it calls the sampler for the given class . Note * that , unless the javaagent command line argument " subclassesAlso " is specified , it won ' t do * anything if o is a subclass of the class that was supposed to be tracked . ...
Class < ? > currentClass = o . getClass ( ) ; while ( currentClass != null ) { List < ConstructorCallback < ? > > samplers = samplerMap . get ( currentClass ) ; if ( samplers != null ) { // Leave in the @ SuppressWarnings , because we define - Werror , // and infrastructure sometimes runs with all warnings turned // on...
public class RemotingClient { /** * Decode response received from remoting server . * @ param data * Result data to decode * @ return Object deserialized from byte buffer data */ private Object decodeResult ( IoBuffer data ) { } }
log . debug ( "decodeResult - data limit: {}" , ( data != null ? data . limit ( ) : 0 ) ) ; processHeaders ( data ) ; int count = data . getUnsignedShort ( ) ; if ( count != 1 ) { throw new RuntimeException ( "Expected exactly one result but got " + count ) ; } Input input = new Input ( data ) ; String target = input ....
public class CheckBase { /** * Pops the top of the stack of active elements if the current position in the call stack corresponds to the one * that pushed the active elements . * < p > This method does not do any type checks , so take care to retrieve the elements with the same types used to push * to them onto t...
return ( ActiveElements < T > ) ( ! activations . isEmpty ( ) && activations . peek ( ) . depth == depth ? activations . pop ( ) : null ) ;
public class Session { /** * Stop the session inactivity timer . */ protected void stopInactivityTimer ( ) { } }
try ( Lock ignored = locker . lockIfNotHeld ( ) ) { if ( sessionInactivityTimer != null ) { sessionInactivityTimer . setIdleTimeout ( - 1 ) ; sessionInactivityTimer = null ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Session inactivity timer stopped" ) ; } } }
public class RepositoryConfiguration { /** * Utility method to replace all system property variables found within the specified document . * @ param doc the document ; may not be null * @ return the modified document if system property variables were found , or the < code > doc < / code > instance if no such * va...
if ( doc . isEmpty ( ) ) return doc ; Document modified = doc . withVariablesReplacedWithSystemProperties ( ) ; if ( modified == doc ) return doc ; // Otherwise , we changed some values . Note that the system properties can only be used in // string values , whereas the schema may expect non - string values . Therefore...
public class StreamSource { /** * Create a pushable { @ link PushableReactiveSeq } * < pre > * { @ code * PushableReactiveSeq < Integer > pushable = StreamSource . ofUnbounded ( ) * . reactiveSeq ( ) ; * pushable . getInput ( ) * . add ( 10 ) ; * on another thread * pushable . getStream ( ) * . collec...
final Queue < T > q = createQueue ( ) ; return new PushableReactiveSeq < T > ( q , q . stream ( ) ) ;
public class EstimateSceneCalibrated { /** * Computes the acture angle between two vectors . Larger this angle is the better the triangulation * of the features 3D location is in general */ double triangulationAngle ( Point2D_F64 normA , Point2D_F64 normB , Se3_F64 a_to_b ) { } }
// the more parallel a line is worse the triangulation . Get rid of bad ideas early here arrowA . set ( normA . x , normA . y , 1 ) ; arrowB . set ( normB . x , normB . y , 1 ) ; GeometryMath_F64 . mult ( a_to_b . R , arrowA , arrowA ) ; // put them into the same reference frame return UtilVector3D_F64 . acute ( arrowA...
public class DetectEntitiesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DetectEntitiesRequest detectEntitiesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( detectEntitiesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( detectEntitiesRequest . getText ( ) , TEXT_BINDING ) ; protocolMarshaller . marshall ( detectEntitiesRequest . getLanguageCode ( ) , LANGUAGECODE_BINDING ) ; } cat...
public class AjaxHelper { /** * Sets the current AJAX operation details . * @ param operation the current AJAX operation . * @ param trigger the current AJAX operation trigger and its context . */ public static void setCurrentOperationDetails ( final AjaxOperation operation , final ComponentWithContext trigger ) { ...
if ( operation == null ) { THREAD_LOCAL_OPERATION . remove ( ) ; } else { THREAD_LOCAL_OPERATION . set ( operation ) ; } if ( trigger == null ) { THREAD_LOCAL_COMPONENT_WITH_CONTEXT . remove ( ) ; } else { THREAD_LOCAL_COMPONENT_WITH_CONTEXT . set ( trigger ) ; }
public class FLACDecoder { /** * Read an array of metadata blocks . * @ return The array of metadata blocks * @ throws IOException On read error */ public Metadata [ ] readMetadata ( ) throws IOException { } }
readStreamSync ( ) ; ArrayList < Metadata > metadataList = new ArrayList < Metadata > ( ) ; Metadata metadata ; do { metadata = readNextMetadata ( ) ; metadataList . add ( metadata ) ; } while ( ! metadata . isLast ( ) ) ; return ( Metadata [ ] ) metadataList . toArray ( new Metadata [ 0 ] ) ;
public class TypeUtil { /** * Convert String value to instance . * @ param type The class of the instance , which may be a primitive TYPE * field . * @ param value The value as a string . * @ return The value as an Object . */ public static Object valueOf ( Class < ? > type , String value ) { } }
try { if ( type . equals ( java . lang . String . class ) ) { return value ; } Method m = class2Value . get ( type ) ; if ( m != null ) { return m . invoke ( null , value ) ; } if ( type . equals ( java . lang . Character . TYPE ) || type . equals ( java . lang . Character . class ) ) { return new Character ( value . c...
public class JobHistoryFileParserBase { /** * extract the string around Xmx in the java child opts " - Xmx1024m - verbose : gc " * @ param javaChildOptsStr * @ return string that represents the Xmx value */ static String extractXmxValueStr ( String javaChildOptsStr ) { } }
if ( StringUtils . isBlank ( javaChildOptsStr ) ) { LOG . info ( "Null/empty input argument to get xmxValue, returning " + Constants . DEFAULT_XMX_SETTING_STR ) ; return Constants . DEFAULT_XMX_SETTING_STR ; } // first split based on " - Xmx " in " - Xmx1024m - verbose : gc " final String JAVA_XMX_PREFIX = "-Xmx" ; Str...
public class ReactiveMongoClientFactory { /** * Creates a { @ link MongoClient } using the given { @ code settings } . If the environment * contains a { @ code local . mongo . port } property , it is used to configure a client to * an embedded MongoDB instance . * @ param settings the settings * @ return the Mo...
Integer embeddedPort = getEmbeddedPort ( ) ; if ( embeddedPort != null ) { return createEmbeddedMongoClient ( settings , embeddedPort ) ; } return createNetworkMongoClient ( settings ) ;
public class FirestoreAdminClient { /** * Gets the metadata and configuration for a Field . * < p > Sample code : * < pre > < code > * try ( FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient . create ( ) ) { * FieldName name = FieldName . of ( " [ PROJECT ] " , " [ DATABASE ] " , " [ COLLECTION _...
GetFieldRequest request = GetFieldRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getField ( request ) ;
public class CommonOps_DSCC { /** * Performs matrix addition : < br > * C = & alpha ; A + & beta ; B * @ param alpha scalar value multiplied against A * @ param A Matrix * @ param beta scalar value multiplied against B * @ param B Matrix * @ param C Output matrix . * @ param gw ( Optional ) Storage for in...
if ( A . numRows != B . numRows || A . numCols != B . numCols ) throw new MatrixDimensionException ( "Inconsistent matrix shapes. " + stringShapes ( A , B ) ) ; C . reshape ( A . numRows , A . numCols ) ; ImplCommonOps_DSCC . add ( alpha , A , beta , B , C , gw , gx ) ;
public class ScanningQueryEngine { /** * Create a node sequence containing the results of the original query as defined by the supplied plan . * @ param originalQuery the original query command ; may not be null * @ param context the context in which the query is to be executed ; may not be null * @ param plan th...
NodeSequence rows = null ; final String workspaceName = sources . getWorkspaceName ( ) ; final NodeCache cache = context . getNodeCache ( workspaceName ) ; final TypeSystem types = context . getTypeSystem ( ) ; final BufferManager bufferManager = context . getBufferManager ( ) ; switch ( plan . getType ( ) ) { case ACC...
public class ExtendedBufferedReader { /** * Reads all characters up to ( but not including ) the given character . * @ param c the character to read up to * @ return the string up to the character < code > c < / code > * @ throws IOException */ public String readUntil ( char c ) throws IOException { } }
if ( lookaheadChar == UNDEFINED ) { lookaheadChar = super . read ( ) ; } line . clear ( ) ; // reuse while ( lookaheadChar != c && lookaheadChar != END_OF_STREAM ) { line . append ( ( char ) lookaheadChar ) ; if ( lookaheadChar == '\n' ) { lineCounter ++ ; } lastChar = lookaheadChar ; lookaheadChar = super . read ( ) ;...
public class Pql { /** * Creates a { @ link Value } from the value i . e . a { @ link TextValue } for a value of type { @ code * String } , { @ link BooleanValue } for type { @ code Boolean } , { @ link NumberValue } for type { @ code * Double } , { @ code Long } , or { @ code Integer } , { @ link DateTimeValue } f...
if ( value instanceof Value ) { return ( Value ) value ; } else if ( value == null ) { return new TextValue ( ) ; } else { if ( value instanceof Boolean ) { BooleanValue booleanValue = new BooleanValue ( ) ; booleanValue . setValue ( ( Boolean ) value ) ; return booleanValue ; } else if ( value instanceof Double || val...
public class ULocale { /** * < strong > [ icu ] < / strong > Based on a HTTP formatted list of acceptable locales , determine an available * locale for the user . NullPointerException is thrown if acceptLanguageList or * availableLocales is null . If fallback is non - null , it will contain true if a * fallback l...
if ( acceptLanguageList == null ) { throw new NullPointerException ( ) ; } ULocale acceptList [ ] = null ; try { acceptList = parseAcceptLanguage ( acceptLanguageList , true ) ; } catch ( ParseException pe ) { acceptList = null ; } if ( acceptList == null ) { return null ; } return acceptLanguage ( acceptList , availab...
public class FrameBufferHA { /** * This is called from ( Android ) < code > MapView . onDraw ( ) < / code > . */ @ Override public void draw ( GraphicContext graphicContext ) { } }
graphicContext . fillColor ( this . displayModel . getBackgroundColor ( ) ) ; // Swap bitmaps before the Canvas . drawBitmap to prevent flickering as much as possible swapBitmaps ( ) ; if ( this . odBitmap != null ) { graphicContext . drawBitmap ( this . odBitmap , this . matrix ) ; }
public class AbstractLayoutManager { /** * set up properly the final JRStyle of the column element ( for detail band ) upon condition style and odd - background * @ param jrstyle * @ param column */ private void setUpConditionStyles ( JRDesignStyle jrstyle , AbstractColumn column ) { } }
if ( getReport ( ) . getOptions ( ) . isPrintBackgroundOnOddRows ( ) && Utils . isEmpty ( column . getConditionalStyles ( ) ) ) { JRDesignExpression expression = new JRDesignExpression ( ) ; expression . setValueClass ( Boolean . class ) ; expression . setText ( EXPRESSION_TRUE_WHEN_ODD ) ; Style oddRowBackgroundStyle ...
public class FloatArrays { /** * Gets the number of times a given value occurs in an array . */ public static int count ( float [ ] array , float val ) { } }
int count = 0 ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( array [ i ] == val ) { count ++ ; } } return count ;
public class IOUtils { /** * < p > uniquePath . < / p > * @ param name a { @ link java . lang . String } object . * @ param ext a { @ link java . lang . String } object . * @ return a { @ link java . lang . String } object . * @ throws java . io . IOException if any . */ public static String uniquePath ( String...
File file = File . createTempFile ( name , ext ) ; String path = file . getAbsolutePath ( ) ; file . delete ( ) ; return path ;
public class Config { /** * Initialize the Config object . This method should only be called once . */ private void init ( ) { } }
if ( properties != null ) { return ; } LOGGER . info ( "Initializing Configuration" ) ; properties = new Properties ( ) ; final String alpineAppProp = PathUtil . resolve ( System . getProperty ( ALPINE_APP_PROP ) ) ; if ( StringUtils . isNotBlank ( alpineAppProp ) ) { LOGGER . info ( "Loading application properties fro...
public class SqlTableAlert { /** * / * ( non - Javadoc ) * @ see org . parosproxy . paros . db . paros . TableAlert # update ( int , java . lang . String , int , int , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang ...
SqlPreparedStatementWrapper psUpdate = null ; try { psUpdate = DbSQL . getSingleton ( ) . getPreparedStatement ( "alert.ps.update" ) ; psUpdate . getPs ( ) . setString ( 1 , alert ) ; psUpdate . getPs ( ) . setInt ( 2 , risk ) ; psUpdate . getPs ( ) . setInt ( 3 , confidence ) ; psUpdate . getPs ( ) . setString ( 4 , d...
public class Pdf417 { /** * Adds the Macro PDF417 control block codewords ( if any ) . */ private void addMacroCodewords ( ) { } }
// if the structured append series size is 1 , this isn ' t // actually part of a structured append series if ( structuredAppendTotal == 1 ) { return ; } // add the Macro marker codeword codeWords [ codeWordCount ++ ] = 928 ; // add the segment index , padded with leading zeros to five digits // use numeric compaction ...
public class TableUtils { /** * Issue the database statements to drop the table associated with a dao . * @ param dao * Associated dao . * @ return The number of statements executed to do so . */ public static < T , ID > int dropTable ( Dao < T , ID > dao , boolean ignoreErrors ) throws SQLException { } }
ConnectionSource connectionSource = dao . getConnectionSource ( ) ; Class < T > dataClass = dao . getDataClass ( ) ; DatabaseType databaseType = connectionSource . getDatabaseType ( ) ; if ( dao instanceof BaseDaoImpl < ? , ? > ) { return doDropTable ( databaseType , connectionSource , ( ( BaseDaoImpl < ? , ? > ) dao )...
public class AbstractArithmeticTransform { /** * ~ Methods * * * * * */ @ Override public List < Metric > transform ( QueryContext context , List < Metric > metrics ) { } }
if ( metrics == null ) { throw new MissingDataException ( "The metrics list cannot be null or empty while performing arithmetic transformations." ) ; } if ( metrics . isEmpty ( ) ) { return metrics ; } Metric result = new Metric ( getResultScopeName ( ) , RESULT_METRIC_NAME ) ; Map < Long , Double > resultDatapoints = ...
public class Operator { /** * Equivalence : Return True if both operands are True or both are False . The EQV operator is the * opposite of the XOR operator . For example , True EQV True is True , but True EQV False is False . * @ param left value to check * @ param right value to check * @ return result of ope...
return ( left == true && right == true ) || ( left == false && right == false ) ;
public class DatabaseAccountsInner { /** * Online the specified region for the specified Azure Cosmos DB database account . * @ param resourceGroupName Name of an Azure resource group . * @ param accountName Cosmos DB database account name . * @ param region Cosmos DB region , with spaces between words and each w...
return beginOnlineRegionWithServiceResponseAsync ( resourceGroupName , accountName , region ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ;
public class NetworkUtils { /** * Rebuild the updater state after a learning rate change . * With updaters like Adam , they have 2 components . . . m and v array , for a total updater state size of 2 * numParams . * Because we combine across parameters and layers where possible ( smaller number of larger operations...
if ( origUpdaterState == null ) return origUpdaterState ; // First : check if there has been any change in the updater blocks to warrant rearranging the updater state view array if ( orig . size ( ) == newUpdater . size ( ) ) { boolean allEq = true ; for ( int i = 0 ; i < orig . size ( ) ; i ++ ) { UpdaterBlock ub1 = o...
public class CommerceAddressRestrictionPersistenceImpl { /** * Returns the commerce address restrictions before and after the current commerce address restriction in the ordered set where commerceCountryId = & # 63 ; . * @ param commerceAddressRestrictionId the primary key of the current commerce address restriction ...
CommerceAddressRestriction commerceAddressRestriction = findByPrimaryKey ( commerceAddressRestrictionId ) ; Session session = null ; try { session = openSession ( ) ; CommerceAddressRestriction [ ] array = new CommerceAddressRestrictionImpl [ 3 ] ; array [ 0 ] = getByCommerceCountryId_PrevAndNext ( session , commerceAd...
public class PropertyChangeUtils { /** * Returns whether the given class seems to maintain PropertyChangeListener * instances . That is , whether the given class has the public instance * methods * < code > addPropertyChangeListener ( PropertyChangeListener ) < / code > * and * < code > removePropertyChangeLi...
Objects . requireNonNull ( c , "The class may not be null" ) ; Method addMethod = Methods . getMethodOptional ( c , "addPropertyChangeListener" , PropertyChangeListener . class ) ; if ( addMethod == null || ! isPublicInstanceMethod ( addMethod ) ) { return false ; } Method removeMethod = Methods . getMethodOptional ( c...
public class OpenAPIModelFilterAdapter { /** * { @ inheritDoc } */ @ Override public OAuthFlows visitOAuthFlows ( Context context , OAuthFlows authFlows ) { } }
visitor . visitOAuthFlows ( context , authFlows ) ; return authFlows ;
public class PerformanceMetrics { /** * Creates new instance of performance metrics . Stores the key and correlation id of the parent metrics instance . * Assigns next level . * @ param nextAction a short name of measured operation , typically a first prefix of descriptor * @ param nextDescriptor a full descripti...
return createNext ( nextAction , nextDescriptor , null ) ;
public class RESTResponseHelper { /** * This method creates the TreeTank response XML element . * @ param document * The { @ link Document } instance for the response . * @ return The created XML { @ link Element } . */ private static Element createResultElement ( final Document document ) { } }
final Element ttResponse = document . createElementNS ( "http://jaxrx.org/" , "result" ) ; ttResponse . setPrefix ( "jaxrx" ) ; return ttResponse ;
public class StreamTransformation { /** * Sets an user provided hash for this operator . This will be used AS IS the create the * JobVertexID . * < p > The user provided hash is an alternative to the generated hashes , that is considered when * identifying an operator through the default hash mechanics fails ( e ...
Preconditions . checkNotNull ( uidHash ) ; Preconditions . checkArgument ( uidHash . matches ( "^[0-9A-Fa-f]{32}$" ) , "Node hash must be a 32 character String that describes a hex code. Found: " + uidHash ) ; this . userProvidedNodeHash = uidHash ;
public class Order { /** * Return all or part of an order . The order must have a status of < code > paid < / code > or < code > * fulfilled < / code > before it can be returned . Once all items have been returned , the order will * become < code > canceled < / code > or < code > returned < / code > depending on wh...
return returnOrder ( params , ( RequestOptions ) null ) ;
public class SrvShoppingCart { /** * < p > Handle event cart delivering or line changed * and redone forced service if need . < / p > * @ param pRqVs request scoped vars * @ param pCart cart * @ param pTxRules Tax Rules * @ throws Exception - an exception . */ @ Override public final void hndCartChan ( final ...
@ SuppressWarnings ( "unchecked" ) List < Deliv > dlvMts = ( List < Deliv > ) pRqVs . get ( "dlvMts" ) ; Deliv cdl = null ; for ( Deliv dl : dlvMts ) { if ( dl . getItsId ( ) . equals ( pCart . getDeliv ( ) ) ) { cdl = dl ; break ; } } if ( cdl == null ) { throw new Exception ( "wrong delivering!" ) ; } // it must be a...
public class LTPAKeyInfoManager { /** * Given the path to the LTPA key file return the WsResource for the file * if the file exists . * @ param ltpaKeyFile * @ return WsResource if the file exist , null if it does not . */ final WsResource getLTPAKeyFileResource ( WsLocationAdmin locService , String ltpaKeyFile )...
WsResource ltpaFile = locService . resolveResource ( ltpaKeyFile ) ; if ( ltpaFile != null && ltpaFile . exists ( ) ) { return ltpaFile ; } else { // The file does not exist so return null return null ; }
public class DescribeResourcePermissionsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeResourcePermissionsRequest describeResourcePermissionsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeResourcePermissionsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeResourcePermissionsRequest . getAuthenticationToken ( ) , AUTHENTICATIONTOKEN_BINDING ) ; protocolMarshaller . marshall ( describeResourcePerm...
public class ShardedThriftClientPool { /** * set new services for this pool ( TODO may throw * { @ link IndexOutOfBoundsException } at { @ link # getShardedPool ( Object ) } * in heavy load environment ) * @ param services * @ return previous pool , you must release each pool ( for example wait * some seconds...
synchronized ( poolMap ) { logger . info ( "reinit pool using new serviceList: {}" , services ) ; Map < Integer , ThriftClientPool < T > > previousMap = poolMap ; init ( services ) ; return previousMap ; }
public class SubjectUtils { /** * Makes a String representation of { @ code items } with collapsed duplicates and additional class * info . * < p > Example : { @ code countDuplicatesAndAddTypeInfo ( [ 1 , 2 , 2 , 3 ] ) = = " [ 1 , 2 [ 3 copies ] ] * ( java . lang . Integer ) " } and { @ code countDuplicatesAndAdd...
Collection < ? > items = iterableToCollection ( itemsIterable ) ; Optional < String > homogeneousTypeName = getHomogeneousTypeName ( items ) ; return homogeneousTypeName . isPresent ( ) ? lenientFormat ( "%s (%s)" , countDuplicates ( items ) , homogeneousTypeName . get ( ) ) : countDuplicates ( addTypeInfoToEveryItem (...
public class Util { /** * Joins the items in array with a delimiter , and appends the result to StringBuilder . * @ param sb StringBuilder to append result to * @ param array array of items to join . * @ param delimiter delimiter to insert between elements of array . */ public static void join ( StringBuilder sb ...
if ( empty ( array ) ) { return ; } sb . append ( array [ 0 ] ) ; for ( int i = 1 ; i < array . length ; i ++ ) { sb . append ( delimiter ) ; sb . append ( array [ i ] ) ; }
public class Compatibility { /** * Checks the name and descriptor for known compatibility issues and throws an * exception if an incompatibility is found . * If the column names are not compatible across components or if any * partition name duplicates its source field name , this will cause an error . * @ para...
checkDatasetName ( namespace , name ) ; checkDescriptor ( descriptor ) ;
public class AbstractScriptParser { /** * 获取真实的缓存时间值 * @ param expire 缓存时间 * @ param expireExpression 缓存时间表达式 * @ param arguments 方法参数 * @ param result 方法执行返回结果 * @ return real expire * @ throws Exception 异常 */ public int getRealExpire ( int expire , String expireExpression , Object [ ] arguments , Object r...
Integer tmpExpire = null ; if ( null != expireExpression && expireExpression . length ( ) > 0 ) { tmpExpire = this . getElValue ( expireExpression , null , arguments , result , true , Integer . class ) ; if ( null != tmpExpire && tmpExpire . intValue ( ) >= 0 ) { // 返回缓存时间表达式计算的时间 return tmpExpire . intValue ( ) ; } } ...
public class FineUploader5Resume { /** * The number of days before a persistent resume record will expire . * @ param nRecordsExpireIn * New value . Must be & ge ; 0. * @ return this for chaining */ @ Nonnull public FineUploader5Resume setRecordsExpireIn ( @ Nonnegative final int nRecordsExpireIn ) { } }
ValueEnforcer . isGE0 ( nRecordsExpireIn , "RecordsExpireIn" ) ; m_nResumeRecordsExpireIn = nRecordsExpireIn ; return this ;
public class FormLayoutFormBuilder { /** * Add a binder to a column and a row . Equals to builder . addBinding ( component , column , * row ) . * @ param binding The binding to add * @ param column The column on which the binding must be added * @ param column The row on which the binding must be added * @ re...
return this . addBinding ( binding , column , row , 1 , 1 ) ;
public class ScenarioExecutor { /** * Starts the scenario with the given method and arguments . * Derives the description from the method name . * @ param method the method that started the scenario * @ param arguments the test arguments with their parameter names */ public void startScenario ( Class < ? > testCl...
listener . scenarioStarted ( testClass , method , arguments ) ; if ( method . isAnnotationPresent ( Pending . class ) ) { Pending annotation = method . getAnnotation ( Pending . class ) ; if ( annotation . failIfPass ( ) ) { failIfPass ( ) ; } else if ( ! annotation . executeSteps ( ) ) { methodInterceptor . disableMet...
public class ReaderGroupProperty { /** * Convert the given object to string with each line indented by 4 spaces * ( except the first line ) . */ private String toIndentedString ( java . lang . Object o ) { } }
if ( o == null ) { return "null" ; } return o . toString ( ) . replace ( "\n" , "\n " ) ;
public class NatsTransporter { /** * - - - CONNECT - - - */ @ Override public void connect ( ) { } }
try { // Create NATS client options Options . Builder builder = new Options . Builder ( ) ; if ( secure ) { builder . secure ( ) ; } if ( username != null && password != null && ! username . isEmpty ( ) && ! password . isEmpty ( ) ) { builder . userInfo ( username , password ) ; } if ( sslContext != null ) { builder . ...
public class HFSUtils { /** * Converts the memory size to number of sectors . * @ param requestSize requested filesystem size in bytes * @ param sectorSize the size of each sector in bytes * @ return total sectors of HFS + including estimated metadata zone size */ public static long getNumSector ( String requestS...
Double memSize = Double . parseDouble ( requestSize ) ; Double sectorBytes = Double . parseDouble ( sectorSize ) ; Double nSectors = memSize / sectorBytes ; Double memSizeKB = memSize / 1024 ; Double memSizeGB = memSize / ( 1024 * 1024 * 1024 ) ; Double memSize100GB = memSizeGB / 100 ; // allocation bitmap file : one b...
public class ADStarNodeExpander { /** * Updating the priority of a node is required when changing the value of Epsilon . */ public void updateKey ( N node ) { } }
node . getKey ( ) . update ( node . getG ( ) , node . getV ( ) , heuristicFunction . estimate ( node . state ( ) ) , epsilon , add , scale ) ;
public class KeyVaultClientCustomImpl { /** * Updates the specified certificate issuer . * @ param updateCertificateIssuerRequest * the grouped properties for updating a certificate issuer request * @ param serviceCallback * the async ServiceCallback to handle successful and failed * responses . * @ return ...
return updateCertificateIssuerAsync ( updateCertificateIssuerRequest . vaultBaseUrl ( ) , updateCertificateIssuerRequest . issuerName ( ) , updateCertificateIssuerRequest . provider ( ) , updateCertificateIssuerRequest . credentials ( ) , updateCertificateIssuerRequest . organizationDetails ( ) , updateCertificateIssue...
public class ControlBean { /** * The postInvoke method is called after all operations on the control . It is the basic * hook for logging , context initialization , resource management , and other common * services . */ protected void postInvoke ( Method m , Object [ ] args , Object retval , Throwable t ) { } }
postInvoke ( m , args , retval , t , null , null ) ;
public class MetadataFinder { /** * Finishes the process of attaching a metadata cache file once it has been opened and validated . * @ param slot the slot to which the cache should be attached * @ param cache the opened , validated metadata cache file */ void attachMetadataCacheInternal ( SlotReference slot , Meta...
MetadataCache oldCache = metadataCacheFiles . put ( slot , cache ) ; if ( oldCache != null ) { try { oldCache . close ( ) ; } catch ( IOException e ) { logger . error ( "Problem closing previous metadata cache" , e ) ; } } deliverCacheUpdate ( slot , cache ) ;
public class LogOutputFactory { /** * Creates a pre - populated StringBuilder instance . The output contains the following : * " Time = < now > RequestTime = < duration > URL = < request URL > Method = < http method > Format = < requested format e . g . ' json ' > Resource = < route pattern > Machine = < machineName ...
StringBuilder builder = new StringBuilder ( ) ; builder . append ( "Time=" + ( ( DateFormat ) DATE_FORMAT . clone ( ) ) . format ( new Date ( ) ) ) ; builder . append ( " RequestTime=" + duration ) ; builder . append ( " URL=" + request . getUrl ( ) ) ; builder . append ( " Method=" + request . getHttpMethod ( ) . name...
public class ServerSideEncryption { /** * Create a new server - side - encryption object for encryption with customer * provided keys ( a . k . a . SSE - C ) . * @ param key The secret AES - 256 key . * @ return An instance of ServerSideEncryption implementing SSE - C . * @ throws InvalidKeyException if the pro...
if ( ! isCustomerKeyValid ( key ) ) { throw new InvalidKeyException ( "The secret key is not a 256 bit AES key" ) ; } return new ServerSideEncryptionCopyWithCustomerKey ( key , MessageDigest . getInstance ( ( "MD5" ) ) ) ;
public class SearchFavouritesServiceInMemoryImpl { /** * If creator is not set , only shared favourites will be checked ( if * shared ) ! */ public void deleteSearchFavourite ( SearchFavourite sf ) throws IOException { } }
synchronized ( lock ) { if ( sf == null || sf . getId ( ) == null ) { throw new IllegalArgumentException ( "null, or id not set!" ) ; } else { allFavourites . remove ( sf . getId ( ) ) ; if ( sf . isShared ( ) ) { sharedFavourites . remove ( sf . getId ( ) ) ; } else { if ( sf . getCreator ( ) != null ) { Map < Long , ...
public class ApplicationSecurityGroupsInner { /** * Creates or updates an application security group . * @ param resourceGroupName The name of the resource group . * @ param applicationSecurityGroupName The name of the application security group . * @ param parameters Parameters supplied to the create or update A...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , applicationSecurityGroupName , parameters ) . map ( new Func1 < ServiceResponse < ApplicationSecurityGroupInner > , ApplicationSecurityGroupInner > ( ) { @ Override public ApplicationSecurityGroupInner call ( ServiceResponse < ApplicationSecurityGroupI...
public class World { /** * Sets the { @ code PublicRootActor } instances as a { @ code Stoppable } . ( INTERNAL ONLY ) * @ param privateRoot the { @ code Stoppable } protocol backed by the { @ code PrivateRootActor } */ synchronized void setPublicRoot ( final Stoppable publicRoot ) { } }
if ( publicRoot != null && this . publicRoot != null ) { throw new IllegalStateException ( "The public root already exists." ) ; } this . publicRoot = publicRoot ;
public class ValueAnimator { /** * Called internally to start an animation by adding it to the active animations list . Must be * called on the UI thread . */ private void startAnimation ( ) { } }
initAnimation ( ) ; sAnimations . get ( ) . add ( this ) ; if ( mStartDelay > 0 && mListeners != null ) { // Listeners were already notified in start ( ) if startDelay is 0 ; this is // just for delayed animations ArrayList < AnimatorListener > tmpListeners = ( ArrayList < AnimatorListener > ) mListeners . clone ( ) ; ...
public class AmazonCloudFormationClient { /** * Returns the summary information for stacks whose status matches the specified StackStatusFilter . Summary * information for stacks that have been deleted is kept for 90 days after the stack is deleted . If no * StackStatusFilter is specified , summary information for ...
request = beforeClientExecution ( request ) ; return executeListStacks ( request ) ;
public class ZipUtil { /** * Changes an existing ZIP file : replaces a given entry in it . * @ param zip * an existing ZIP file . * @ param entry * new ZIP entry . * @ return < code > true < / code > if the entry was replaced . */ public static boolean replaceEntry ( final File zip , final ZipEntrySource entr...
return operateInPlace ( zip , new InPlaceAction ( ) { public boolean act ( File tmpFile ) { return replaceEntry ( zip , entry , tmpFile ) ; } } ) ;
public class CmsCroppingParamBean { /** * Parses an image scale parameter and returns the parsed data . < p > * @ param param the image path including the scale parameter * @ return the cropping data */ public static CmsCroppingParamBean parseScaleParam ( String param ) { } }
CmsCroppingParamBean result = new CmsCroppingParamBean ( ) ; if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( param ) ) { return result ; } String [ ] parameters = param . split ( SCALE_PARAM_DELIMITER ) ; for ( int i = 0 ; i < parameters . length ; i ++ ) { String scaleParam = parameters [ i ] . trim ( ) ; if ( scalePar...
public class UnsafeMappedBytes { /** * Allocates a mapped buffer . * Memory will be mapped by opening and expanding the given { @ link java . io . File } to the desired { @ code count } and mapping the * file contents into memory via { @ link java . nio . channels . FileChannel # map ( java . nio . channels . FileC...
if ( file == null ) throw new NullPointerException ( "file cannot be null" ) ; if ( mode == null ) mode = MappedMemoryAllocator . DEFAULT_MAP_MODE ; if ( size > MappedMemory . MAX_SIZE ) throw new IllegalArgumentException ( "size for MappedBytes cannot be greater than " + MappedMemory . MAX_SIZE ) ; return new UnsafeMa...
public class CassandraStorage { /** * read wide row */ public Tuple getNextWide ( ) throws IOException { } }
CfInfo cfInfo = getCfInfo ( loadSignature ) ; CfDef cfDef = cfInfo . cfDef ; ByteBuffer key = null ; Tuple tuple = null ; DefaultDataBag bag = new DefaultDataBag ( ) ; try { while ( true ) { hasNext = reader . nextKeyValue ( ) ; if ( ! hasNext ) { if ( tuple == null ) tuple = TupleFactory . getInstance ( ) . newTuple (...
public class LRImporter { /** * Obtain the path used for an obtain request * @ param requestID the " request _ ID " parameter for the request * @ param byResourceID the " by _ resource _ ID " parameter for the request * @ param byDocID the " by _ doc _ ID " parameter for the request * @ param idsOnly the " ids ...
String path = obtainPath ; if ( resumptionToken != null ) { path += "?" + resumptionTokenParam + "=" + resumptionToken ; return path ; } if ( requestID != null ) { path += "?" + requestIDParam + "=" + requestID ; } else { // error return null ; } if ( byResourceID ) { path += "&" + byResourceIDParam + "=" + booleanTrue...
public class DesignDocumentManager { /** * Performs a query to retrieve all the design documents defined in the database . * @ return a list of the design documents from the database * @ throws IOException if there was an error communicating with the server * @ since 2.5.0 */ public List < DesignDocument > list (...
return db . getAllDocsRequestBuilder ( ) . startKey ( "_design/" ) . endKey ( "_design0" ) . inclusiveEnd ( false ) . includeDocs ( true ) . build ( ) . getResponse ( ) . getDocsAs ( DesignDocument . class ) ;
public class MediaManagementApi { /** * Complete a bulk of interactions * Complete a bulk of interactions * @ param mgtCancel ( required ) * @ return ApiSuccessResponse * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiSuccessResponse mgt...
ApiResponse < ApiSuccessResponse > resp = mgtCompleteWithHttpInfo ( mgtCancel ) ; return resp . getData ( ) ;
public class GraphReaderAdapter { /** * { @ inheritDoc } */ public Graph < Edge > readUndirected ( File f , Indexer < String > vertexLabels ) throws IOException { } }
throw new UnsupportedOperationException ( ) ;
public class RequestHttpBase { /** * Sets a footer , replacing an already - existing footer * @ param key the header key to set . * @ param value the header value to set . */ public void setFooter ( String key , String value ) { } }
Objects . requireNonNull ( value ) ; int i = 0 ; boolean hasFooter = false ; for ( i = _footerKeys . size ( ) - 1 ; i >= 0 ; i -- ) { String oldKey = _footerKeys . get ( i ) ; if ( oldKey . equalsIgnoreCase ( key ) ) { if ( hasFooter ) { _footerKeys . remove ( i ) ; _footerValues . remove ( i ) ; } else { hasFooter = t...
public class CachedFwAssistantDirector { public FwCoreDirection assistCoreDirection ( ) { } }
if ( coreDirection != null ) { return coreDirection ; } synchronized ( this ) { if ( coreDirection != null ) { return coreDirection ; } final FwCoreDirection direction = createCoreDirection ( ) ; prepareCoreDirection ( direction ) ; coreDirection = direction ; } return coreDirection ;
import java . util . regex . * ; public class ValidateString { /** * Function to verify if a given string begins with a vowel , using RegEx . * Args : * input _ string : A string to be validated . * Returns : * " Valid " if the string starts with a vowel , " Invalid " otherwise . * Examples : * > > > valida...
Pattern p = Pattern . compile ( "^[aeiouAEIOU]" ) ; Matcher m = p . matcher ( inputString ) ; if ( m . find ( ) ) { return "Valid" ; } else { return "Invalid" ; }
public class AVMixPushManager { /** * 取消混合推送的注册 * 取消成功后 , 消息会通过 LeanCloud websocket 发送 */ public static void unRegisterMixPush ( ) { } }
AVInstallation installation = AVInstallation . getCurrentInstallation ( ) ; String vendor = installation . getString ( AVInstallation . VENDOR ) ; if ( ! StringUtil . isEmpty ( vendor ) ) { installation . put ( AVInstallation . VENDOR , "lc" ) ; installation . saveInBackground ( ) . subscribe ( ObserverBuilder . buildS...
public class druidGParser { /** * druidG . g : 355:1 : pairNums returns [ Pair < Integer , Integer > pair ] : ( LSQUARE ( WS ) ? i = LONG ( WS ) ? ' , ' ( WS ) ? j = LONG ( WS ) ? RSQUARE ) ; */ public final Pair < Integer , Integer > pairNums ( ) throws RecognitionException { } }
Pair < Integer , Integer > pair = null ; Token i = null ; Token j = null ; try { // druidG . g : 356:2 : ( ( LSQUARE ( WS ) ? i = LONG ( WS ) ? ' , ' ( WS ) ? j = LONG ( WS ) ? RSQUARE ) ) // druidG . g : 356:4 : ( LSQUARE ( WS ) ? i = LONG ( WS ) ? ' , ' ( WS ) ? j = LONG ( WS ) ? RSQUARE ) { // druidG . g : 356:4 : (...
public class Indexer { /** * Flushes lists of added / removed nodes to SearchManagers , starting indexing . * @ param addedNodes * @ param removedNodes * @ param parentAddedNodes * @ param parentRemovedNodes */ public void updateIndex ( Set < String > addedNodes , Set < String > removedNodes , Set < String > pa...
// pass lists to search manager if ( searchManager != null && ( addedNodes . size ( ) > 0 || removedNodes . size ( ) > 0 ) ) { try { searchManager . updateIndex ( removedNodes , addedNodes ) ; } catch ( RepositoryException e ) { log . error ( "Error indexing changes " + e , e ) ; } catch ( IOException e ) { log . error...
public class Expressions { /** * Create a new TimeExpression * @ param expr the time Expression * @ return new TimeExpression */ public static < T extends Comparable < ? > > TimeExpression < T > asTime ( Expression < T > expr ) { } }
Expression < T > underlyingMixin = ExpressionUtils . extract ( expr ) ; if ( underlyingMixin instanceof PathImpl ) { return new TimePath < T > ( ( PathImpl < T > ) underlyingMixin ) ; } else if ( underlyingMixin instanceof OperationImpl ) { return new TimeOperation < T > ( ( OperationImpl < T > ) underlyingMixin ) ; } ...
public class WebSiteManagementClientImpl { /** * Validate whether a resource can be moved . * Validate whether a resource can be moved . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param moveResourceEnvelope Object that represents the resource to move . * @ param s...
return ServiceFuture . fromResponse ( validateMoveWithServiceResponseAsync ( resourceGroupName , moveResourceEnvelope ) , serviceCallback ) ;
public class GitlabAPI { /** * Gets a build for a project * @ param projectId the project id * @ param jobId the build id * @ return A list of project jobs * @ throws IOException on gitlab api call error */ public GitlabJob getProjectJob ( Integer projectId , Integer jobId ) throws IOException { } }
String tailUrl = GitlabProject . URL + "/" + sanitizeProjectId ( projectId ) + GitlabJob . URL + "/" + jobId ; return retrieve ( ) . to ( tailUrl , GitlabJob . class ) ;
public class AipBodyAnalysis { /** * 人体关键点识别接口 * 对于输入的一张图片 ( 可正常解码 , 且长宽比适宜 ) , * * 检测图片中的所有人体 , 输出每个人体的14个主要关键点 , 包含四肢 、 脖颈 、 鼻子等部位 , 以及人体的坐标信息和数量 * * 。 * @ param image - 二进制图像数据 * @ param options - 可选参数对象 , key : value都为string类型 * options - options列表 : * @ return JSONObject */ public JSONObject bodyAnalysis...
AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; String base64Content = Base64Util . encode ( image ) ; request . addBody ( "image" , base64Content ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( BodyAnalysisConsts . BODY_ANALYSIS ) ; postOperation ( request ) ; ret...
public class SmapGenerator { /** * Methods for serializing the logical SMAP */ public synchronized String getString ( ) { } }
// check state and initialize buffer if ( outputFileName == null ) throw new IllegalStateException ( ) ; StringBuffer out = new StringBuffer ( ) ; // start the SMAP out . append ( "SMAP\n" ) ; out . append ( outputFileName + '\n' ) ; out . append ( defaultStratum + '\n' ) ; // include embedded SMAPs if ( doEmbedded ) {...
public class PSBroker { /** * Forces the given subscriber to unsubscribe from the given type of * messages . * @ param < T > * - The type to unsubscribe from . * @ param s * - The subscriber that will be forced to unsubscribe . * @ param messageType * - The type of message . * @ return Returns true if t...
return subscribeStrategy . unsubscribe ( mapping , s , messageType ) ;