signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class VertxResponseWriter { /** * { @ inheritDoc } */ @ Override public void setSuspendTimeout ( long timeOut , TimeUnit timeUnit ) throws IllegalStateException { } }
if ( timeoutHandler == null ) { throw new IllegalStateException ( "The timeoutHandler is null" ) ; } suspend ( timeOut , timeUnit , timeoutHandler ) ;
public class PersistableRawData { /** * Replace the state of this object with the same object in some other state . * Used for to restore the before image if a transaction rolls back . * @ param other is the object this object is to become a clone of . */ public void becomeCloneOf ( ManagedObject clone ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "becomeCloneOf" , "Clone=" + clone ) ; PersistableRawData object = ( PersistableRawData ) clone ; _data = object . _data ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "becom...
public class AbstractResultSetWrapper { /** * { @ inheritDoc } * @ see java . sql . ResultSet # updateString ( int , java . lang . String ) */ @ Override public void updateString ( final int columnIndex , final String x ) throws SQLException { } }
wrapped . updateString ( columnIndex , x ) ;
public class Decoder { /** * Gets the array of bits from an Aztec Code matrix * @ return the array of bits */ private boolean [ ] extractBits ( BitMatrix matrix ) { } }
boolean compact = ddata . isCompact ( ) ; int layers = ddata . getNbLayers ( ) ; int baseMatrixSize = ( compact ? 11 : 14 ) + layers * 4 ; // not including alignment lines int [ ] alignmentMap = new int [ baseMatrixSize ] ; boolean [ ] rawbits = new boolean [ totalBitsInLayer ( layers , compact ) ] ; if ( compact ) { f...
public class SmbFileOutputStream { /** * Closes this output stream and releases any system resources associated * with it . * @ throws IOException * if a network error occurs */ @ Override public void close ( ) throws IOException { } }
try { if ( this . handle . isValid ( ) ) { this . handle . close ( ) ; } } finally { this . file . clearAttributeCache ( ) ; this . tmp = null ; }
public class HtmlTableTemplate { /** * Returns the coordinate of the cell containing the element , given that root is the root of a HtmlTableTemplate * @ param root * @ param element * @ return */ public static Pair < Integer , Integer > getParentCellForElement ( Element root , Element element ) { } }
Element tbody = getTBodyElement ( root ) ; // Is the element in our table ? and what ' s the path from the table to it ? ArrayList < Element > path = TemplateUtils . isDescendant ( tbody , element ) ; if ( path == null ) return null ; // we know that path [ 0 ] is tbody and that path [ 1 ] is a tr template int row = DO...
public class SimpleIntegerControl { /** * { @ inheritDoc } */ @ Override public void initializeParts ( ) { } }
super . initializeParts ( ) ; getStyleClass ( ) . addAll ( "simple-integer-control" ) ; final SpinnerValueFactory . IntegerSpinnerValueFactory factory = new SpinnerValueFactory . IntegerSpinnerValueFactory ( Integer . MIN_VALUE , Integer . MAX_VALUE , field . getValue ( ) ) ; // override old converter ( IntegerStringCo...
public class ApiOvhDedicatedCloud { /** * Get this object properties * REST : GET / dedicatedCloud / { serviceName } / user / { userId } / objectRight / { objectRightId } * @ param serviceName [ required ] Domain of the service * @ param userId [ required ] * @ param objectRightId [ required ] */ public OvhObje...
String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}" ; StringBuilder sb = path ( qPath , serviceName , userId , objectRightId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhObjectRight . class ) ;
public class EcodInstallation { /** * Populates allDomains */ public void ensureDomainsFileInstalled ( ) throws IOException { } }
// Quick check for availability domainsFileLock . readLock ( ) . lock ( ) ; logger . trace ( "LOCK readlock" ) ; try { if ( allDomains != null ) { return ; } } finally { logger . trace ( "UNLOCK readlock" ) ; domainsFileLock . readLock ( ) . unlock ( ) ; } // Download domains domainsFileLock . writeLock ( ) . lock ( ) ...
public class EventMessenger { /** * Send an { @ link EventMessage } to one client that is subscribed to the given * topicURI . If the client with the given WebSocket session id is not subscribed to * the topicURI nothing happens . * @ param topicURI the name of the topic * @ param event the payload of the { @ l...
sendTo ( topicURI , event , Collections . singleton ( eligibleWebSocketSessionId ) ) ;
public class FessMessages { /** * Add the created action message for the key ' errors . failed _ to _ upload _ kuromoji _ file ' with parameters . * < pre > * message : Failed to upload the Kuromoji file . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNu...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_failed_to_upload_kuromoji_file ) ) ; return this ;
public class LocalizedMessage { /** * Returns the formatted message after looking up the format in the resource bundle . * @ return The formatted message String . */ @ Override public String getFormattedMessage ( ) { } }
if ( formattedMessage != null ) { return formattedMessage ; } ResourceBundle bundle = this . resourceBundle ; if ( bundle == null ) { if ( baseName != null ) { bundle = getResourceBundle ( baseName , locale , false ) ; } else { bundle = getResourceBundle ( loggerName , locale , true ) ; } } final String myKey = getForm...
public class WebSocketContainerExt { /** * ( non - Javadoc ) * @ see javax . websocket . WebSocketContainer # connectToServer ( java . lang . Class , java . net . URI ) */ @ Override public Session connectToServer ( Class < ? > clazz , URI path ) throws DeploymentException , IOException { } }
if ( clazz == null || path == null ) { throw new IllegalArgumentException ( ) ; } Object theObject = null ; ClientConnector x = new ClientConnector ( ) ; try { theObject = getEndpointInstance ( clazz ) ; } catch ( DeploymentException e ) { String msg = Tr . formatMessage ( tc , "client.connection.error" , clazz . toStr...
public class ObjectiveMessageResources { @ Override public boolean isPresent ( Locale locale , String key ) { } }
final String message = getMessage ( locale , key ) ; if ( message == null ) { return false ; } else if ( message . startsWith ( "???" ) && message . endsWith ( "???" ) ) { return false ; } else { return true ; }
public class InitialMatching1 { /** * Sets a { @ link Consumer } to execute if this matches . */ public FluentMatchingC < T > then ( Consumer < A > consumer ) { } }
return then ( new FluentMatchingC < > ( value ) , consumer ) ;
public class TApplicationExceptions { /** * Reads a { @ link TApplicationException } from the specified { @ link TProtocol } . * < p > Note : This has been copied from { @ link TApplicationException # read ( TProtocol ) } due to API differences * between libthrift 0.9 . x and 0.10 . x . */ public static TApplicatio...
TField field ; iprot . readStructBegin ( ) ; String message = null ; int type = TApplicationException . UNKNOWN ; while ( true ) { field = iprot . readFieldBegin ( ) ; if ( field . type == TType . STOP ) { break ; } switch ( field . id ) { case 1 : if ( field . type == TType . STRING ) { message = iprot . readString ( ...
public class DataStoreFactory { /** * Creates a suitable { @ link DataStore } for the specified parameters . * @ param parameters list of GeoTools parameters . * @ return data store , never null * @ throws IOException could not create data store */ public static DataStore create ( Map < String , Object > paramete...
Object url = parameters . get ( ShapefileDataStoreFactory . URLP . key ) ; Logger log = LoggerFactory . getLogger ( DataStoreFactory . class ) ; if ( url instanceof String ) { parameters . put ( ShapefileDataStoreFactory . URLP . key , ResourceUtils . getURL ( ( String ) url ) . toExternalForm ( ) ) ; } if ( DATASTORE_...
public class Genotype { /** * Create a new { @ code Genotype } from a given array of { @ code chromosomes } . * @ since 3.0 * @ param < G > the gene type * @ param chromosomes the { @ code Chromosome } s the returned genotype consists * of * @ return a new { @ code Genotype } from the given chromosomes * @ ...
return new Genotype < > ( ISeq . of ( chromosomes ) ) ;
public class CmsNewsletter { /** * Returns the e - mail for the newsletter . < p > * @ param recipient the recipient to whom the newsletter is sent * @ param cms the CmsObject * @ return the e - mail for the newsletter * @ throws CmsException if something goes wrong */ public Email getEmail ( CmsObject cms , I_...
StringBuffer htmlMsg = new StringBuffer ( 1024 ) ; StringBuffer txtMsg = new StringBuffer ( 1024 ) ; Iterator < I_CmsNewsletterContent > contents = m_contents . iterator ( ) ; while ( contents . hasNext ( ) ) { I_CmsNewsletterContent content = contents . next ( ) ; if ( recipient . isSubscriber ( content ) ) { if ( con...
public class OpMap { /** * Get the namespace of the step . * @ param opPosOfStep The position of the FROM _ XXX step . * @ return The step ' s namespace , NodeTest . WILD , or null for null namespace . */ public String getStepNS ( int opPosOfStep ) { } }
int argLenOfStep = getArgLengthOfStep ( opPosOfStep ) ; // System . out . println ( " getStepNS . argLenOfStep : " + argLenOfStep ) ; if ( argLenOfStep == 3 ) { int index = m_opMap . elementAt ( opPosOfStep + 4 ) ; if ( index >= 0 ) return ( String ) m_tokenQueue . elementAt ( index ) ; else if ( OpCodes . ELEMWILDCARD...
public class DFSContentProvider { /** * / * @ inheritDoc */ public Image getImage ( Object element ) { } }
if ( element instanceof DFSLocationsRoot ) return ImageLibrary . getImage ( "dfs.browser.root.entry" ) ; else if ( element instanceof DFSLocation ) return ImageLibrary . getImage ( "dfs.browser.location.entry" ) ; else if ( element instanceof DFSFolder ) return ImageLibrary . getImage ( "dfs.browser.folder.entry" ) ; e...
public class SARLValidator { /** * Replies the canonical name of the given object . * @ param object the object . * @ return the canonical name or < code > null < / code > if it cannot be computed . */ protected String canonicalName ( EObject object ) { } }
if ( object instanceof JvmIdentifiableElement ) { return ( ( JvmIdentifiableElement ) object ) . getQualifiedName ( ) ; } final EObject jvmElement = this . associations . getPrimaryJvmElement ( object ) ; if ( jvmElement instanceof JvmIdentifiableElement ) { return ( ( JvmIdentifiableElement ) jvmElement ) . getQualifi...
public class BCAImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . BCA__CAT_NAME : setCATName ( ( String ) newValue ) ; return ; case AfplibPackage . BCA__TRIPLETS : getTriplets ( ) . clear ( ) ; getTriplets ( ) . addAll ( ( Collection < ? extends Triplet > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class DBManagerService { /** * Get the information about all active tenants , which are those whose DBService has * been created . The is keyed by tenant name , and its value is a map of parameters * configured for the corresponding DBService . * @ return Map of information for all active tenants . */ publ...
SortedMap < String , SortedMap < String , Object > > activeTenantMap = new TreeMap < > ( ) ; synchronized ( m_tenantDBMap ) { for ( String tenantName : m_tenantDBMap . keySet ( ) ) { DBService dbservice = m_tenantDBMap . get ( tenantName ) ; Map < String , Object > dbServiceParams = dbservice . getAllParams ( ) ; activ...
public class TransactionalSemiUniqueDatedIndex { /** * new to differentiate */ public Object getFromSemiUnique ( Object dataHolder , List extractors ) { } }
Object result = null ; TransactionLocalStorage txStorage = ( TransactionLocalStorage ) perTransactionStorage . get ( MithraManagerProvider . getMithraManager ( ) . zGetCurrentTransactionWithNoCheck ( ) ) ; FullSemiUniqueDatedIndex perThreadAdded = this . getPerThreadAddedIndex ( txStorage ) ; if ( perThreadAdded != nul...
public class InternalSARLParser { /** * InternalSARL . g : 15875:1 : ruleJvmTypeReference returns [ EObject current = null ] : ( ( this _ JvmParameterizedTypeReference _ 0 = ruleJvmParameterizedTypeReference ( ( ( ( ) ruleArrayBrackets ) ) = > ( ( ) ruleArrayBrackets ) ) * ) | this _ XFunctionTypeRef _ 3 = ruleXFunctio...
EObject current = null ; EObject this_JvmParameterizedTypeReference_0 = null ; EObject this_XFunctionTypeRef_3 = null ; enterRule ( ) ; try { // InternalSARL . g : 15881:2 : ( ( ( this _ JvmParameterizedTypeReference _ 0 = ruleJvmParameterizedTypeReference ( ( ( ( ) ruleArrayBrackets ) ) = > ( ( ) ruleArrayBrackets ) )...
public class Shape { /** * Check if strides are in order suitable for non - strided mmul etc . * Returns true if c order and strides are descending [ 100,10,1 ] etc * Returns true if f order and strides are ascending [ 1,10,100 ] etc * False otherwise . * @ return true if c + descending , f + ascending , false ...
if ( array . rank ( ) <= 1 ) return true ; long [ ] strides = array . stride ( ) ; if ( array . isVector ( ) && strides [ 0 ] == 1 && strides [ 1 ] == 1 ) return true ; char order = array . ordering ( ) ; if ( order == 'c' ) { // Expect descending . [ 100,10,1 ] etc for ( int i = 1 ; i < strides . length ; i ++ ) if ( ...
public class Table { /** * Returns list of constraints dependent on more than one column */ OrderedHashSet getContainingConstraints ( int colIndex ) { } }
OrderedHashSet set = new OrderedHashSet ( ) ; for ( int i = 0 , size = constraintList . length ; i < size ; i ++ ) { Constraint c = constraintList [ i ] ; if ( c . hasColumnPlus ( colIndex ) ) { set . add ( c ) ; } } return set ;
public class ApiOvhDedicatedserver { /** * Release a given option * REST : DELETE / dedicated / server / { serviceName } / option / { option } * @ param serviceName [ required ] The internal name of your dedicated server * @ param option [ required ] The option name */ public void serviceName_option_option_DELETE...
String qPath = "/dedicated/server/{serviceName}/option/{option}" ; StringBuilder sb = path ( qPath , serviceName , option ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ;
public class TimePicker { /** * zEventTextFieldChanged , This is called whenever the text in the time picker text field has * changed , whether programmatically or by the user . * If the current text contains a valid time , it will be stored in the variable lastValidTime . * Otherwise , the lastValidTime will not...
// Skip this function if it should not be run . if ( skipTextFieldChangedFunctionWhileTrue ) { return ; } // Gather some variables that we will need . String timeText = timeTextField . getText ( ) ; boolean textIsEmpty = timeText . trim ( ) . isEmpty ( ) ; TimeVetoPolicy vetoPolicy = settings . getVetoPolicy ( ) ; bool...
public class SelfCalibrationLinearDualQuadratic { /** * Makes sure that the found solution is valid and physically possible * @ return true if valid */ boolean sanityCheck ( Intrinsic calib ) { } }
if ( UtilEjml . isUncountable ( calib . fx ) ) return false ; if ( UtilEjml . isUncountable ( calib . fy ) ) return false ; if ( UtilEjml . isUncountable ( calib . skew ) ) return false ; if ( calib . fx < 0 ) return false ; if ( calib . fy < 0 ) return false ; return true ;
public class ReadableLogRecord { /** * careful with trace in this method as it is called many times from doByteByByteScanning */ private static ReadableLogRecord read ( ByteBuffer viewBuffer , long expectedSequenceNumber , ByteBuffer sourceBuffer ) { } }
ReadableLogRecord logRecord = null ; int absolutePosition = sourceBuffer . position ( ) + viewBuffer . position ( ) ; // Read the record magic number field . final byte [ ] magicNumberBuffer = new byte [ RECORD_MAGIC_NUMBER . length ] ; viewBuffer . get ( magicNumberBuffer ) ; int recordLength = 0 ; if ( Arrays . equal...
public class BaseRegistrationScreen { /** * Process the command . * < br / > Step 1 - Process the command if possible and return true if processed . * < br / > Step 2 - If I can ' t process , pass to all children ( with me as the source ) . * < br / > Step 3 - If children didn ' t process , pass to parent ( with ...
boolean bSuccess = super . doCommand ( strCommand , sourceSField , iCommandOptions ) ; if ( MenuConstants . SUBMIT . equalsIgnoreCase ( strCommand ) ) if ( bSuccess ) { // this . setupUserInfo ( ) ; / / Success , set up their databases } return bSuccess ;
public class DateUtil { /** * Get first date from current year * @ param d date * @ return first date from current year */ public static Date getFirstDayFromCurrentYear ( Date d ) { } }
Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( d ) ; cal . set ( Calendar . MONTH , Calendar . JANUARY ) ; cal . set ( Calendar . DAY_OF_MONTH , 1 ) ; cal . set ( Calendar . HOUR_OF_DAY , 0 ) ; cal . set ( Calendar . MINUTE , 0 ) ; cal . set ( Calendar . SECOND , 0 ) ; cal . set ( Calendar . MILLISECOND , ...
public class TemplateAstMatcher { /** * Returns whether two nodes are equivalent , taking into account the template parameters that were * provided to this matcher . If the template comparison node is a parameter node , then only the * types of the node must match . If the template node is a string literal , only m...
if ( isTemplateParameterNode ( template ) ) { int paramIndex = ( int ) ( template . getDouble ( ) ) ; Node previousMatch = paramNodeMatches . get ( paramIndex ) ; if ( previousMatch != null ) { // If this named node has already been matched against , make sure all // subsequent usages of the same named node are equival...
public class KinesisDataStreamMarshaller { /** * Marshall the given parameter object . */ public void marshall ( KinesisDataStream kinesisDataStream , ProtocolMarshaller protocolMarshaller ) { } }
if ( kinesisDataStream == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( kinesisDataStream . getArn ( ) , ARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) ,...
public class DeviceProxyDAODefaultImpl { public DbDatum [ ] get_property ( final DeviceProxy deviceProxy , final String [ ] propertyNames ) throws DevFailed { } }
if ( deviceProxy . url . protocol == TANGO ) { checkIfUseDb ( deviceProxy , "get_property()" ) ; if ( deviceProxy . getDb_dev ( ) == null ) { deviceProxy . setDb_dev ( new DbDevice ( deviceProxy . devname , deviceProxy . url . host , deviceProxy . url . strPort ) ) ; } return deviceProxy . getDb_dev ( ) . get_property ...
public class ExtensionLoaderFactory { /** * Get extension loader by extensible class with listener * @ param clazz Extensible class * @ param listener Listener of ExtensionLoader * @ param < T > Class * @ return ExtensionLoader of this class */ public static < T > ExtensionLoader < T > getExtensionLoader ( Clas...
ExtensionLoader < T > loader = LOADER_MAP . get ( clazz ) ; if ( loader == null ) { synchronized ( ExtensionLoaderFactory . class ) { loader = LOADER_MAP . get ( clazz ) ; if ( loader == null ) { loader = new ExtensionLoader < T > ( clazz , listener ) ; LOADER_MAP . put ( clazz , loader ) ; } } } return loader ;
public class JndiBinder { /** * Obtain the connection factory * { @ inheritDoc } */ public Object getObjectInstance ( Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { } }
Reference ref = ( Reference ) obj ; String objName = ( String ) ref . get ( "name" ) . getContent ( ) ; return objs . get ( objName ) ;
public class MoreMath { /** * Return partial derivative x * @ param f * @ return */ public static DoubleBinaryOperator dx ( DoubleBinaryOperator f ) { } }
return ( x , y ) -> { double h = x != 0.0 ? SQRT_EPSILON * x : SQRT_EPSILON ; double h2 = 2.0 * h ; double y1 = - f . applyAsDouble ( x + h2 , y ) ; double y2 = 8.0 * f . applyAsDouble ( x + h , y ) ; double y3 = - 8.0 * f . applyAsDouble ( x - h , y ) ; double y4 = f . applyAsDouble ( x - h2 , y ) ; return ( y1 + y2 +...
public class XsdAsmInterfaces { /** * Obtains the name of the next type of the sequence . * @ param className The name of the class which contains the sequence . * @ param groupName The groupName of this sequence , if any . * @ param sequenceName The sequence name . * @ param isLast Indication if the next type ...
if ( isLast ) return groupName == null ? className + "Complete" : className ; else return className + firstToUpper ( sequenceName ) ;
public class BlobSnippets { /** * [ VARIABLE 8] */ public byte [ ] readContentRange ( int start , int end ) throws IOException { } }
// [ START readContentRange ] try ( ReadChannel reader = blob . reader ( ) ) { reader . seek ( start ) ; ByteBuffer bytes = ByteBuffer . allocate ( end - start ) ; reader . read ( bytes ) ; return bytes . array ( ) ; } // [ END readContentRange ]
public class CliState { /** * This method initializes the { @ link # getArguments ( ) arguments } . This means that the { @ link # getArguments ( ) * arguments } are ordered properly . * @ see CliArgument # addCloseTo ( ) * @ see CliArgument # addAfter ( ) */ protected void initializeArguments ( ) { } }
Map < String , BasicDoubleLinkedNode < CliArgumentContainer > > argumentMap = new HashMap < > ( ) ; BasicDoubleLinkedNode < CliArgumentContainer > startHead = null ; BasicDoubleLinkedNode < CliArgumentContainer > startTail = null ; BasicDoubleLinkedNode < CliArgumentContainer > endHead = null ; BasicDoubleLinkedNode < ...
public class SamlIdPObjectEncrypter { /** * Gets key encryption credential . * @ param peerEntityId the peer entity id * @ param adaptor the adaptor * @ param service the service * @ return the key encryption credential * @ throws Exception the exception */ protected Credential getKeyEncryptionCredential ( fi...
val config = DefaultSecurityConfigurationBootstrap . buildDefaultEncryptionConfiguration ( ) ; val overrideDataEncryptionAlgorithms = samlIdPProperties . getAlgs ( ) . getOverrideDataEncryptionAlgorithms ( ) ; val overrideKeyEncryptionAlgorithms = samlIdPProperties . getAlgs ( ) . getOverrideKeyEncryptionAlgorithms ( )...
public class ArrayUtils { /** * 将给定的基本数据类型的数组转换成给定封装数组类型的Set 。 注意 : 相同hashCode的元素将只保留一个 。 Convert primitive array * to given wrapper type set . * @ param array 源数组 。 source array . * @ param wrapperType 将要转换成的封装类型 。 the array element type will convert to given * wrapper type . * @ return 一个新的给定封装类型的Set并包含按给定数...
T [ ] objectArray = toArray ( array , wrapperType ) ; return toSet ( objectArray ) ;
public class JniServerSocketImpl { /** * Accepts a new connection from the socket . * @ param socket the socket connection structure * @ return true if the accept returns a new socket . */ @ Override public boolean accept ( SocketBar socket ) throws IOException { } }
JniSocketImpl jniSocket = ( JniSocketImpl ) socket ; if ( _fd == 0 ) throw new IOException ( "accept from closed socket" ) ; return jniSocket . accept ( this , _fd , _socketTimeout ) ;
public class CreateIntegrationResponseRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateIntegrationResponseRequest createIntegrationResponseRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createIntegrationResponseRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createIntegrationResponseRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( createIntegrationResponseRequest . getContentHandlin...
public class CmsJspStandardContextBean { /** * Gets a bean containing information about the current template . < p > * @ return the template information bean */ public TemplateBean getTemplate ( ) { } }
TemplateBean templateBean = getRequestAttribute ( CmsTemplateContextManager . ATTR_TEMPLATE_BEAN ) ; if ( templateBean == null ) { templateBean = new TemplateBean ( "" , "" ) ; } return templateBean ;
public class Configuration { /** * Set the < code > value < / code > of the < code > name < / code > property . * @ param name property name . * @ param value property value . */ public void set ( String name , String value ) { } }
getOverlay ( ) . setProperty ( name , value ) ; getProps ( ) . setProperty ( name , value ) ;
public class XmlIO { /** * XMLをファイルに保存する 。 * @ since 1.1 * @ param xmlInfo XML情報 。 * @ param file 書き込み先 * @ param encoding ファイルの文字コード 。 * @ throws XmlOperateException XMLの書き込みに失敗した場合 。 * @ throws IllegalArgumentException xmlInfo is null . * @ throws IllegalArgumentException file is null or encoding is em...
ArgUtils . notNull ( xmlInfo , "xmlInfo" ) ; ArgUtils . notNull ( file , "file" ) ; ArgUtils . notEmpty ( encoding , "encoding" ) ; final Marshaller marshaller ; try { JAXBContext context = JAXBContext . newInstance ( xmlInfo . getClass ( ) ) ; marshaller = context . createMarshaller ( ) ; marshaller . setProperty ( Ma...
public class AbstractFlowFactoryBean { /** * Convert supplied object to of action if possible . */ protected Action toAction ( Object item ) { } }
if ( item instanceof Action ) { return ( Action ) item ; } else if ( item instanceof String ) { final String definition = ( String ) item ; return new DefaultAction ( definition + "@" + RANDOM . nextInt ( ) , resolveDataFunction ( ( String ) item ) , getMiddleware ( definition ) ) ; } else { String name ; List < Middle...
public class DataSourceService { /** * Declarative Services method for unsetting the JDBC driver service reference * @ param ref reference to the service */ protected void unsetDriver ( ServiceReference < JDBCDriverService > ref ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "unsetDriver" , ref ) ;
public class MediaType { /** * Convenience method that parses the given media type strings and * returns an unmodifiable set that contains all the parsed types . * @ since Apache Tika 1.2 * @ param types media type strings * @ return unmodifiable set of the parsed types */ public static Set < MediaType > set ( ...
Set < MediaType > set = new HashSet < MediaType > ( ) ; for ( String type : types ) { MediaType mt = parse ( type ) ; if ( mt != null ) { set . add ( mt ) ; } } return Collections . unmodifiableSet ( set ) ;
public class ApplicationResource { /** * ( non - Javadoc ) * @ see net . roboconf . dm . rest . services . internal . resources . IApplicationResource * # getCommandInstructions ( java . lang . String , java . lang . String ) */ @ Override public Response getCommandInstructions ( String appName , String commandName...
this . logger . fine ( "Request: get instructions from " + commandName + " in the " + appName + " application." ) ; Response response ; try { Application app = this . manager . applicationMngr ( ) . findApplicationByName ( appName ) ; String res ; if ( app == null ) response = Response . status ( Status . NOT_FOUND ) ....
public class DocEnv { /** * Check whether this member should be documented . */ public boolean shouldDocument ( VarSymbol sym ) { } }
long mod = sym . flags ( ) ; if ( ( mod & Flags . SYNTHETIC ) != 0 ) { return false ; } return showAccess . checkModifier ( translateModifiers ( mod ) ) ;
public class CreateApplicationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateApplicationRequest createApplicationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createApplicationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createApplicationRequest . getAuthor ( ) , AUTHOR_BINDING ) ; protocolMarshaller . marshall ( createApplicationRequest . getDescription ( ) , DESCRIPTION_BINDIN...
public class GetUpgradeHistoryResult { /** * A list of < code > < a > UpgradeHistory < / a > < / code > objects corresponding to each Upgrade or Upgrade Eligibility Check * performed on a domain returned as part of < code > < a > GetUpgradeHistoryResponse < / a > < / code > object . * < b > NOTE : < / b > This meth...
if ( this . upgradeHistories == null ) { setUpgradeHistories ( new java . util . ArrayList < UpgradeHistory > ( upgradeHistories . length ) ) ; } for ( UpgradeHistory ele : upgradeHistories ) { this . upgradeHistories . add ( ele ) ; } return this ;
public class CmsJspTagElementSetting { /** * Internal action method . < p > * @ param setting the setting to look up * @ param defaultValue the default value * @ param escape if the result String should be HTML escaped or not * @ param req the current request * @ return the value of the element setting or < c...
String value = elementSettingTagAction ( req ) . get ( setting ) ; if ( value == null ) { value = defaultValue ; } if ( escape ) { // HTML escape the value value = CmsEncoder . escapeHtml ( value ) ; } return value ;
public class ResourceBundlesHandlerImpl { /** * Executes the global preprocessing * @ param bundlesToBuild * The list of bundles to rebuild * @ param processBundleFlag * the flag indicating if the bundles needs to be processed * @ param stopWatch * the stopWatch */ private void executeGlobalPreprocessing ( ...
stopProcessIfNeeded ( ) ; if ( resourceTypePreprocessor != null ) { if ( stopWatch != null ) { stopWatch . start ( "Global preprocessing" ) ; } GlobalPreprocessingContext ctx = new GlobalPreprocessingContext ( config , resourceHandler , processBundleFlag ) ; resourceTypePreprocessor . processBundles ( ctx , bundles ) ;...
public class ModelAdapter { /** * sets a complete new list of items onto this adapter , using the new list . Calls notifyDataSetChanged * @ param list the new items to set * @ param retainFilter set to true if you want to keep the filter applied * @ return this */ public ModelAdapter < Model , Item > setNewList (...
List < Item > items = intercept ( list ) ; if ( mUseIdDistributor ) { getIdDistributor ( ) . checkIds ( items ) ; } // reset the filter CharSequence filter = null ; if ( getItemFilter ( ) . getConstraint ( ) != null ) { filter = getItemFilter ( ) . getConstraint ( ) ; getItemFilter ( ) . performFiltering ( null ) ; } m...
public class DataCenterFilter { /** * Method allow to filter data centers by references . * @ param dataCenterRefs is list of references to target dataCenter * @ return { @ link DataCenterFilter } */ public DataCenterFilter dataCenters ( DataCenter ... dataCenterRefs ) { } }
allItemsNotNull ( dataCenterRefs , "Datacenter references" ) ; predicate = predicate . and ( Filter . or ( Streams . map ( dataCenterRefs , DataCenter :: asFilter ) ) . getPredicate ( ) ) ; return this ;
public class AbstractExpression { /** * Ferret out the first argument . This can be m _ left or else * the first element of m _ args . */ public AbstractExpression getFirstArgument ( ) { } }
if ( m_left != null ) { assert ( m_args == null ) ; return m_left ; } if ( m_args != null && m_args . size ( ) > 0 ) { assert ( m_left == null && m_right == null ) ; return m_args . get ( 0 ) ; } return null ;
public class BELScriptParser { /** * BELScript . g : 156:1 : function returns [ String r ] : ( fv = ' proteinAbundance ' | fv = ' p ' | fv = ' rnaAbundance ' | fv = ' r ' | fv = ' abundance ' | fv = ' a ' | fv = ' microRNAAbundance ' | fv = ' m ' | fv = ' geneAbundance ' | fv = ' g ' | fv = ' biologicalProcess ' | fv =...
BELScriptParser . function_return retval = new BELScriptParser . function_return ( ) ; retval . start = input . LT ( 1 ) ; Object root_0 = null ; Token fv = null ; Object fv_tree = null ; try { // BELScript . g : 156:28 : ( ( fv = ' proteinAbundance ' | fv = ' p ' | fv = ' rnaAbundance ' | fv = ' r ' | fv = ' abundance...
public class SgClass { /** * Returns the name of the conversion method to return a primitive type * value from the following types : { @ link java . lang . Boolean } , * { @ link java . lang . Byte } , { @ link java . lang . Character } , * { @ link java . lang . Short } , { @ link java . lang . Integer } , * {...
final String name = clasz . getName ( ) ; if ( name . equals ( Boolean . class . getName ( ) ) ) { return "booleanValue" ; } if ( name . equals ( Byte . class . getName ( ) ) ) { return "byteValue" ; } if ( name . equals ( Character . class . getName ( ) ) ) { return "charValue" ; } if ( name . equals ( Short . class ....
public class QueueSharder { /** * Return one of the managed queues - the selection method cannot be relied on . It should * be considered a random managed queue . * @ return a queue */ public T getQueue ( ) { } }
Preconditions . checkState ( state . get ( ) == State . STARTED , "Not started" ) ; List < String > localPreferredQueues = Lists . newArrayList ( preferredQueues ) ; if ( localPreferredQueues . size ( ) > 0 ) { String key = localPreferredQueues . get ( random . nextInt ( localPreferredQueues . size ( ) ) ) ; return que...
public class Proposal { /** * Gets the approvalStatus value for this Proposal . * @ return approvalStatus * The approval status of the { @ code Proposal } for the active * user or { @ code null } if the active * user has no action needed . * < span class = " constraint Applicable " > This attribute * is appli...
return approvalStatus ;
public class Configurator { /** * Takes vector of ProtocolConfigurations , iterates through it , creates Protocol for * each ProtocolConfiguration and returns all Protocols in a list . * @ param protocol _ configs List of ProtocolConfigurations * @ param stack The protocol stack * @ return List of Protocols */ ...
List < Protocol > retval = new LinkedList < > ( ) ; for ( int i = 0 ; i < protocol_configs . size ( ) ; i ++ ) { ProtocolConfiguration protocol_config = protocol_configs . get ( i ) ; Protocol layer = createLayer ( stack , protocol_config ) ; if ( layer == null ) return null ; retval . add ( layer ) ; } return retval ;
public class CompensatingTransactionUtils { /** * Perform the specified operation , storing the state prior to the operation * in order to enable commit / rollback later . If no transaction is currently * active , proceed with the original call on the target . * @ param synchronizationKey * the transaction sync...
CompensatingTransactionHolderSupport transactionResourceHolder = ( CompensatingTransactionHolderSupport ) TransactionSynchronizationManager . getResource ( synchronizationKey ) ; if ( transactionResourceHolder != null ) { CompensatingTransactionOperationManager transactionOperationManager = transactionResourceHolder . ...
public class FilteredRequest { /** * Returns the user defined as parameter " user " if present . */ @ Override public String getRemoteUser ( ) { } }
String user = getHeader ( "X_REMOTE_USER" ) ; if ( user != null ) { return user ; } else { return super . getRemoteUser ( ) ; }
public class Stream { /** * Returns stream of aggregated results based on the given window configuration . * @ param windowConfig window configuration like window length and slide length . * @ param windowStoreFactory intermediary tuple store for storing tuples for windowing * @ param inputFields input fields *...
return window ( windowConfig , windowStoreFactory , inputFields , aggregator , functionFields , true ) ;
public class CSSParserVisitorImpl { /** * remove terminal node emtpy tokens from input list * @ param inputArrayList original list * @ return list without terminal node type = S ( space ) */ private List < ParseTree > filterSpaceTokens ( List < ParseTree > inputArrayList ) { } }
List < ParseTree > ret = new ArrayList < ParseTree > ( inputArrayList . size ( ) ) ; for ( ParseTree item : inputArrayList ) { if ( ! ( item instanceof TerminalNode ) || ( ( TerminalNodeImpl ) item ) . getSymbol ( ) . getType ( ) != CSSLexer . S ) { ret . add ( item ) ; } } return ret ;
public class Promises { /** * Returns the type of ` await [ expr ] ` . * < p > This is equivalent to the type of ` result ` in ` Promise . resolve ( [ expr ] ) . then ( result = > ` * < p > For example : * < p > { @ code ! Promise < number > } becomes { @ code number } * < p > { @ code ! IThenable < number > } ...
if ( type . isUnknownType ( ) ) { return type ; } if ( type . isUnionType ( ) ) { UnionTypeBuilder unionTypeBuilder = UnionTypeBuilder . create ( registry ) ; for ( JSType alternate : type . toMaybeUnionType ( ) . getAlternates ( ) ) { unionTypeBuilder . addAlternate ( getResolvedType ( registry , alternate ) ) ; } ret...
public class FileUtil { /** * 递归遍历目录以及子目录中的所有文件 < br > * 如果提供file为文件 , 直接返回过滤结果 * @ param file 当前遍历文件或目录 * @ param fileFilter 文件过滤规则对象 , 选择要保留的文件 , 只对文件有效 , 不过滤目录 * @ return 文件列表 */ public static List < File > loopFiles ( File file , FileFilter fileFilter ) { } }
List < File > fileList = new ArrayList < File > ( ) ; if ( null == file ) { return fileList ; } else if ( false == file . exists ( ) ) { return fileList ; } if ( file . isDirectory ( ) ) { final File [ ] subFiles = file . listFiles ( ) ; if ( ArrayUtil . isNotEmpty ( subFiles ) ) { for ( File tmp : subFiles ) { fileLis...
public class Caster { /** * cast a Object to a Float Object ( reference type ) * @ param o Object to cast * @ param defaultValue * @ return casted Float Object */ public static Float toFloat ( Object o , Float defaultValue ) { } }
if ( o instanceof Float ) return ( Float ) o ; if ( defaultValue != null ) return new Float ( toFloatValue ( o , defaultValue . floatValue ( ) ) ) ; float res = toFloatValue ( o , Float . MIN_VALUE ) ; if ( res == Float . MIN_VALUE ) return defaultValue ; return new Float ( res ) ;
public class SimpleULogger { /** * For parameterized messages , first substitute parameters and then log . * @ param level level * @ param parameterizedMsg message pattern * @ param param1 param1 * @ param param2 param2 */ private void parameterizedLog ( final String level , final Object parameterizedMsg , fina...
if ( parameterizedMsg instanceof String ) { String msgStr = ( String ) parameterizedMsg ; msgStr = MessageFormatter . format ( msgStr , param1 , param2 ) ; log ( level , msgStr , null ) ; } else { // To be failsafe , we handle the case where ' messagePattern ' is not // a String . Unless the user makes a mistake , this...
public class TransformedInputRow { /** * Constructs a { @ link TransformedInputRow } based on another row , or returns * the row if it is already a { @ link TransformedInputRow } . * @ param row * @ return */ public static TransformedInputRow of ( final InputRow row ) { } }
if ( row instanceof TransformedInputRow ) { // re - use existing transformed input row . return ( TransformedInputRow ) row ; } else { return new TransformedInputRow ( row , row . getId ( ) ) ; }
public class NumberUtils { /** * Requires that an { @ code int } can be represented as an unsigned { @ code byte } . * @ param i the { @ code int } to test * @ return the { @ code int } if it can be represented as an unsigned { @ code byte } * @ throws IllegalArgumentException if { @ code i } cannot be represente...
if ( i > UNSIGNED_BYTE_MAX_VALUE ) { throw new IllegalArgumentException ( String . format ( "%d is larger than %d bits" , i , UNSIGNED_BYTE_SIZE ) ) ; } return i ;
public class StmtCommonTableScan { /** * Copy the table schema from the shared part to here . * We have to repair the table aliases . */ private void copyTableSchemaFromShared ( ) { } }
for ( SchemaColumn scol : m_sharedScan . getOutputSchema ( ) ) { SchemaColumn copy = new SchemaColumn ( scol . getTableName ( ) , getTableAlias ( ) , scol . getColumnName ( ) , scol . getColumnAlias ( ) , scol . getExpression ( ) , scol . getDifferentiator ( ) ) ; addOutputColumn ( copy ) ; }
public class ConfigUtil { /** * Like { @ link # loadProperties ( String , ClassLoader ) } but the properties are loaded into the * supplied { @ link Properties } object . */ public static void loadProperties ( String path , ClassLoader loader , Properties target ) throws IOException { } }
InputStream in = getStream ( path , loader ) ; if ( in == null ) { throw new FileNotFoundException ( path ) ; } target . load ( in ) ; in . close ( ) ;
public class Entry { /** * Sets the entry title . * @ param title the entry title , < b > null < / b > if none . */ public void setTitle ( final String title ) { } }
if ( this . title == null ) { this . title = new Content ( ) ; } this . title . setValue ( title ) ;
public class CsvConfigurationDetection { /** * Auto - detect the { @ link CsvConfiguration } of a CSV style data file , * providing the encoding externally . * @ param encoding * @ return a detected CSV configuration * @ throws IllegalStateException if an error occurs during auto - detection */ public CsvConfig...
final byte [ ] sample = getSampleBuffer ( ) ; return suggestCsvConfiguration ( sample , encoding , columnNames ) ;
public class TypedArrayCompat { /** * Extracts theme attributes from a typed array for later resolution using { @ link * Resources . Theme # resolveAttributes ( int [ ] , int [ ] ) } . Removes the entries from the typed array so * that subsequent calls to typed getters will return the default value without crashing...
int [ ] scrap = null ; /* if ( mRecycled ) { throw new RuntimeException ( " Cannot make calls to a recycled instance ! " ) ; */ int [ ] attrs = null ; int [ ] mData = null ; try { Field mDataField = array . getClass ( ) . getDeclaredField ( "mData" ) ; mDataField . setAccessible ( true ) ; mData = ( int [ ] ) mDataFi...
public class TableModel { /** * Search and return the IdGenerator in this TableModel by its generationType * and name */ public IdGenerator getIdGenerator ( GenerationType generationType , String name ) { } }
return getIdGenerator ( generationType , name , getIdGenerators ( ) ) ;
public class ConsistentHashRing { /** * Returns the appropriate server for the given key . * Running time : O ( 1) * @ param key * @ throws java . util . NoSuchElementException if the ring is empty * @ return */ public ServiceInformation get ( String key ) { } }
ServiceInformation info = null ; long hash = algorithm . hash ( key ) ; // Find the first server with a hash key after this one final SortedMap < Long , ServiceInformation > tailMap = ring . tailMap ( hash ) ; // Wrap around to the beginning of the ring , if we went past the last one hash = tailMap . isEmpty ( ) ? ring...
public class CSVString { /** * forward pos until the end of quote */ StringBuilder fwdQuote ( char q ) { } }
StringBuilder sb = new StringBuilder ( ) ; while ( hasNext ( ) ) { next ( ) ; sb . append ( buffer [ pos ] ) ; if ( isCurr ( q ) ) { if ( isNext ( q ) ) { // consecutive quote sign next ( ) ; } else { break ; } } } if ( sb . length ( ) > 0 ) sb . setLength ( sb . length ( ) - 1 ) ; // remove closing quote sign return s...
public class AbstractResourceRegistration { /** * { @ inheritDoc } */ @ Override public final DescriptionProvider getModelDescription ( final PathAddress address ) { } }
if ( parent != null ) { RootInvocation ri = getRootInvocation ( ) ; return ri . root . getModelDescription ( ri . pathAddress . append ( address ) ) ; } // else we are the root return getModelDescription ( address . iterator ( ) ) ;
public class DirectoryBasedOverlayContainerImpl { /** * { @ inheritDoc } */ @ Override public void addToNonPersistentCache ( String path , Class owner , Object data ) { } }
cacheStore . addToCache ( path , owner , data ) ;
public class ModelMapper { /** * Returns the TypeMap for the { @ code sourceType } and { @ code destinationType } , else returns * { @ code null } if none exists . * @ param < S > source type * @ param < D > destination type * @ throws IllegalArgumentException is { @ code sourceType } or { @ code destinationTyp...
Assert . notNull ( sourceType , "sourceType" ) ; Assert . notNull ( destinationType , "destinationType" ) ; return config . typeMapStore . < S , D > get ( sourceType , destinationType , null ) ;
public class AbcGrammar { /** * ifield - area : : = % 5B . % 41 . % 3A * WSP tex - text - ifield % 5D < p > * < tt > [ A : . . ] < / tt > */ Rule IfieldArea ( ) { } }
return Sequence ( String ( "[A:" ) , ZeroOrMore ( WSP ( ) ) . suppressNode ( ) , TexTextIfield ( ) , String ( "]" ) ) . label ( IfieldArea ) ;
public class DynamicCompositeAgent { /** * { @ inheritDoc } * Note that one agent throwing an exception on close will not prevent other agents from being closed . * @ throws RuntimeException if any sub - agent throws an exception onClose . The agents exceptions are collected as * suppressed exceptions in the thro...
status = Status . CLOSED ; RuntimeException ce = null ; for ( final Agent agent : agents ) { try { agent . onClose ( ) ; } catch ( final Exception ex ) { if ( ce == null ) { ce = new RuntimeException ( getClass ( ) . getName ( ) + ": underlying agent error on close" ) ; } ce . addSuppressed ( ex ) ; } } agents = EMPTY_...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcAxis2Placement2D ( ) { } }
if ( ifcAxis2Placement2DEClass == null ) { ifcAxis2Placement2DEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 32 ) ; } return ifcAxis2Placement2DEClass ;
public class HysteresisEdgeTraceMark { /** * Traces along object ' s contour starting at the specified seed . As it does so it will set the intensity of * points which are below the lower threshold to zero and add points to contour . */ protected void trace ( int x , int y , int indexInten ) { } }
int dx , dy ; int indexOut = output . getIndex ( x , y ) ; open . grow ( ) . set ( x , y ) ; output . data [ indexOut ] = 1 ; intensity . data [ indexInten ] = MARK_TRAVERSED ; while ( open . size ( ) > 0 ) { active . set ( open . removeTail ( ) ) ; indexInten = intensity . getIndex ( active . x , active . y ) ; int in...
public class RestTemplateBuilder { /** * Set the { @ link RestTemplateCustomizer RestTemplateCustomizers } that should be * applied to the { @ link RestTemplate } . Customizers are applied in the order that they * were added after builder configuration has been applied . Setting this value will * replace any prev...
Assert . notNull ( restTemplateCustomizers , "RestTemplateCustomizers must not be null" ) ; return new RestTemplateBuilder ( this . detectRequestFactory , this . rootUri , this . messageConverters , this . requestFactorySupplier , this . uriTemplateHandler , this . errorHandler , this . basicAuthentication , Collection...
public class Sql { /** * A variant of { @ link # eachRow ( String , java . util . List , groovy . lang . Closure , int , int , groovy . lang . Closure ) } * allowing the named parameters to be supplied in a map . * @ param sql the sql statement * @ param map a map containing the named parameters * @ param offse...
eachRow ( sql , singletonList ( map ) , metaClosure , offset , maxRows , rowClosure ) ;
public class RasmolCommandListener { /** * takes care of the cursor up / down keys . triggers copying of stored * commands into the current textfield */ @ Override public void keyReleased ( KeyEvent e ) { } }
int code = e . getKeyCode ( ) ; // String s = e . getKeyText ( code ) ; // System . out . println ( s ) ; if ( ( code == KeyEvent . VK_UP ) || ( code == KeyEvent . VK_KP_UP ) ) { // go one back in history ; if ( historyPosition > 0 ) { historyPosition = historyPosition - 1 ; } } else if ( ( code == KeyEvent . VK_DOWN )...
public class Matrix { /** * Scales matrix m by x , y , and z , putting the result in sm * @ param sm returns the result * @ param smOffset index into sm where the result matrix starts * @ param m source matrix * @ param mOffset index into m where the source matrix starts * @ param x scale factor x * @ param...
for ( int i = 0 ; i < 4 ; i ++ ) { int smi = smOffset + i ; int mi = mOffset + i ; sm [ smi ] = m [ mi ] * x ; sm [ 4 + smi ] = m [ 4 + mi ] * y ; sm [ 8 + smi ] = m [ 8 + mi ] * z ; sm [ 12 + smi ] = m [ 12 + mi ] ; }
public class Broker { /** * Sends an event to the default exchange . * @ param channel Name of the channel . * @ param message Message to send . */ public void sendMessage ( String channel , Message message ) { } }
ensureChannel ( channel ) ; admin . getRabbitTemplate ( ) . convertAndSend ( exchange . getName ( ) , channel , message ) ;
public class EndpointBuilder { /** * Builds an proxy for a remote XML - RPC service located at < code > uri < / code > . * Call get ( ) to obtain instance . * @ param uri * URL to a remote XML - RPC service * @ param clazz * declaring remote XML - RPC methods * @ param < T > * proxy interface * @ return...
return new EndpointBuilder < T > ( uri , clazz ) ;
public class ListPrincipalsResult { /** * The principals . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setPrincipals ( java . util . Collection ) } or { @ link # withPrincipals ( java . util . Collection ) } if you want to * override the existing values...
if ( this . principals == null ) { setPrincipals ( new java . util . ArrayList < Principal > ( principals . length ) ) ; } for ( Principal ele : principals ) { this . principals . add ( ele ) ; } return this ;
public class Convert { /** * 替换全角为半角 * @ param text 文本 * @ param notConvertSet 不替换的字符集合 * @ return 替换后的字符 */ public static String toDBC ( String text , Set < Character > notConvertSet ) { } }
char c [ ] = text . toCharArray ( ) ; for ( int i = 0 ; i < c . length ; i ++ ) { if ( null != notConvertSet && notConvertSet . contains ( c [ i ] ) ) { // 跳过不替换的字符 continue ; } if ( c [ i ] == '\u3000' || c [ i ] == '\u00a0' || c [ i ] == '\u2007' || c [ i ] == '\u202F' ) { // \ u3000是中文全角空格 , \ u00a0 、 \ u2007 、 \ u2...