code
stringlengths
10
174k
nl
stringlengths
3
129k
public void writeStatement(Statement oldStm){ boolean internal=this.internal; this.internal=true; try { super.writeStatement(oldStm); mark(oldStm); Object target=oldStm.getTarget(); if (target instanceof Field) { String method=oldStm.getMethodName(); Object[] args=oldStm.getArguments()...
Records the Statement so that the Encoder will produce the actual output when the stream is flushed. <P> This method should only be invoked within the context of initializing a persistence delegate.
public static boolean followsSQFFunctionNameRules(SQFVariable variable){ return SQFStatic.followsSQFFunctionNameRules(variable.getVarName()); }
Checks if the given variable name follows the general rules of function naming (requires tag, _fnc_ and then an identifier). <p>Examples: tag_fnc_function, sj_fnc_function2</p> <p>Counter Examples: tag_fn_c_function, sj_nc_function2, potatoes, _fnc_function</p>
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:11.679 -0500",hash_original_method="A04989E1C9551E085CB246E835FB8373",hash_generated_method="72794CF8418DDDE2C6E8DE9C87189279") public void updateEF(AdnRecord adn,int ef,int extensionEF,int recordNumber,String pin2,Message response)...
Write adn to a EF SIM record It will get the record size of EF record and compose hex adn array then write the hex array to EF record
protected void writeExternalIndexCreateStmt(Table table,IIndex index,StringBuilder ddl){ if (databaseInfo.isIndicesSupported()) { if (index.getName() == null) { log.warn("Cannot write unnamed index " + index); } else { ddl.append("CREATE"); if (index.isUnique()) { ddl.append(" UNIQU...
Writes the given index of the table.
public static InputStream emptyInputStream(){ return emptyInputStream; }
Provide empty InputStream. <p> This implementation can be convenient if you need to place some empty value to s3 bucket.
public final void testKnownGeotoolsTransformation(){ CoordinateTransformation transformation=TransformationFactory.getCoordinateTransformation(TransformationFactory.WGS84_UTM35S,TransformationFactory.WGS84); assertNotNull(transformation); assertTrue(transformation instanceof GeotoolsTransformation); }
Test if GeoTools handles the requested coordinate transformation.
protected ForkJoinWorkerThread(ForkJoinPool pool){ super("aForkJoinWorkerThread"); this.pool=pool; this.workQueue=pool.registerWorker(this); }
Creates a ForkJoinWorkerThread operating in the given pool.
GeneralRange<T> reverse(){ GeneralRange<T> result=reverse; if (result == null) { result=new GeneralRange<T>(Ordering.from(comparator).reverse(),hasUpperBound,getUpperEndpoint(),getUpperBoundType(),hasLowerBound,getLowerEndpoint(),getLowerBoundType()); result.reverse=this; return this.reverse=result; }...
Returns the same range relative to the reversed comparator.
protected void fireTableEvent(int row0,int row1,int col,int type){ if (col == EventConstants.ALL_COLUMNS && type == EventConstants.DELETE) { for (int r=row0; r <= row1; ++r) clearAggregateMappings(r,false); } super.fireTableEvent(row0,row1,col,type); }
Clear all aggregate mappings for a row when it is deleted.
public boolean isArmed(){ return other.isArmed(); }
All these methods simply delegate to the "other" model that is being decorated.
public static KeyStroke parseKeyStroke(String keyStroke){ if (keyStroke == null) { return null; } int modifiers=0; int index=keyStroke.indexOf('+'); if (index != -1) { for (int i=0; i < index; i++) { switch (Character.toUpperCase(keyStroke.charAt(i))) { case 'A': modifiers|=InputEvent.ALT_MASK...
Converts a string to a keystroke. The string should be of the form <i>modifiers</i>+<i>shortcut</i> where <i>modifiers</i> is any combination of A for Alt, C for Control, S for Shift or M for Meta, and <i>shortcut</i> is either a single character, or a keycode name from the <code>KeyEvent</code> class, without the <cod...
private void seekVideo(int seekTo){ mMediaPlayer.seekTo(seekTo); }
Seeks to specific time
public RaptorState deepCopy(){ RaptorState state=this; RaptorState ret=this.copy(); RaptorState copy=ret; while (state.previous != null) { copy.previous=state.previous.copy(); copy.previous.previous=null; state=state.previous; copy=copy.previous; } return ret; }
Do a deep copy of this RaptorState and all parent raptor states.
private ResultFormat(String value){ this.paramValue=value; }
Constructs a new ResultFormat object using a given value to use for the "alt" parameter.
public static String convertImageId(String response){ String model="<photoid>"; return response.substring(response.indexOf(model) + model.length(),response.indexOf("</photoid>")); }
Get image id when response is obtained.
public List<NamedRelatedVirtualPoolRep> listByTenant(URI tenantId){ UriBuilder builder=client.uriBuilder(baseUrl); builder.queryParam(SearchConstants.TENANT_ID_PARAM,tenantId); VirtualPoolList response=client.getURI(VirtualPoolList.class,builder.build()); return ResourceUtils.defaultList(response.getVirtualPool...
Lists all virtual pools of specific tenant <p> API Call: <tt>GET /object/vpools</tt>
public MarshalException(String message){ super(message); }
Constructs a new <code>MarshalException</code> with the specified detail message.
public synchronized ISourceRange mapSource(IType type,char[] contents,IBinaryType info,IJavaElement elementToFind){ this.binaryType=(BinaryType)type; if (this.sourceRanges.get(type) != null) return (elementToFind != null) ? getNameRange(elementToFind) : null; this.importsTable.remove(this.binaryType); this.im...
Maps the given source code to the given binary type and its children. If a non-null java element is passed, finds the name range for the given java element without storing it.
public JMenuItem(String text){ this(text,(Icon)null); }
Creates a <code>JMenuItem</code> with the specified text.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:36:12.872 -0500",hash_original_method="2F687A14AA3727476BB6949A7966696D",hash_generated_method="C526E32916C0209761BD154F36DD7C08") private String doubleQuote(String param){ if...
"Double-quotes" the argument.
public static String uuid(){ char[] uuid=new char[36]; int r; uuid[8]=uuid[13]=uuid[18]=uuid[23]='-'; uuid[14]='4'; for (int i=0; i < 36; i++) { if (uuid[i] == 0) { r=(int)(Math.random() * 16); uuid[i]=CHARS[(i == 19) ? (r & 0x3) | 0x8 : r & 0xf]; } } return new String(uuid); }
Generate a RFC4122, version 4 ID. Example: "92329D39-6F5C-4520-ABFC-AAB64544E172"
public static boolean isECAvailable(KeyStoreType keyStoreType){ return ((JavaVersion.getJreVersion().isAtLeast(JavaVersion.JRE_VERSION_170) && sunECProviderAvailable) || isBouncyCastleKeyStore(keyStoreType)); }
Checks if EC curves are available for the given keyStoreType (i.e. either BC key store type or at least Java 7)
public void checkAllRegistered(Collection<WorldGeneratorModifier> modifiers){ toIds(modifiers); }
Checks that all modifiers are registered.
public boolean equals(Object otherObj){ if (!(otherObj instanceof CharArrayList)) return super.equals(otherObj); if (this == otherObj) return true; if (otherObj == null) return false; CharArrayList other=(CharArrayList)otherObj; if (size() != other.size()) return false; char[] theElements=elements()...
Compares the specified Object with the receiver. Returns true if and only if the specified Object is also an ArrayList of the same type, both Lists have the same size, and all corresponding pairs of elements in the two Lists are identical. In other words, two Lists are defined to be equal if they contain the same ele...
public boolean invalidateIt(){ log.info("invalidateIt - " + toString()); return true; }
Invalidate Document
public String[] diff_prettyHtml(LinkedList<Diff> diffs){ StringBuilder html=new StringBuilder(); int numEqual=0; for ( Diff aDiff : diffs) { String text=aDiff.text.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace("\n","&para;<br>"); switch (aDiff.operation) { case INSERT: html.appen...
Convert a Diff list into a pretty HTML report.
protected void prepare(){ ProcessInfoParameter[] para=getParameter(); for (int i=0; i < para.length; i++) { String name=para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("AD_Window_ID")) p_AD_WindowFrom_ID=para[i].getParameterAsInt(); else log.log(Level...
Prepare - e.g., get Parameters.
public void reset(){ mProvider=null; mTime=0; mElapsedRealtimeNanos=0; mLatitude=0; mLongitude=0; mHasAltitude=false; mAltitude=0; mHasSpeed=false; mSpeed=0; mHasBearing=false; mBearing=0; mHasAccuracy=false; mAccuracy=0; mExtras=null; mIsFromMockProvider=false; }
Clears the contents of the location.
public void endFilterInterval(){ endMillis=System.currentTimeMillis(); totalFilterMillis+=(endMillis - intervalStartMillis); state=TaskState.other; }
Add time for a filter operation interval.
void appendOp(int length,int op){ int totalLen=m_ops.getOp(OpMap.MAPINDEX_LENGTH); m_ops.setOp(totalLen,op); m_ops.setOp(totalLen + OpMap.MAPINDEX_LENGTH,length); m_ops.setOp(OpMap.MAPINDEX_LENGTH,totalLen + length); }
Insert room for operation. This WILL set the length value of the operation, and will update the length value for the total expression.
public void addWidgets(WidgetsModel model){ mRecyclerView.setWidgets(model); mAdapter.setWidgetsModel(model); mAdapter.notifyDataSetChanged(); }
Initialize the widget data model.
public static void test2(int size,AbstractDistribution a,AbstractDistribution b){ System.out.println("FIXME: Should this test exist without hep.aida"); System.out.println("\n\nBenchmarking frequencies...\n"); IntArrayList freq=new IntArrayList(); DoubleArrayList distinct=new DoubleArrayList(); cern.colt.Time...
Prints the first <tt>size</tt> random numbers generated by the distribution.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
@Override public boolean validateFullBounds(){ try { if (comparisonBounds == null) { System.out.println("Im null before."); } comparisonBounds=getUnionOfChildrenBounds(comparisonBounds); if (comparisonBounds == null) { System.out.println("Im null after."); } } catch ( NullPointerEx...
This is a crucial step. We have to override this method to invalidate the paint each time the bounds are changed so we repaint the correct region
public void pushTreeChangedEvent(){ pushTreeChangedEvent(new TreeChangedEvent()); }
Push a tree changed event into the event stack.
@Override public void onTokenRefresh(){ Intent intent=new Intent(this,RegistrationIntentService.class); startService(intent); }
Called if InstanceID token is updated. This may occur if the security of the previous token had been compromised. This call is initiated by the InstanceID provider.
private boolean analyzeTraces(AbstractTestSuiteChromosome<? extends ExecutableChromosome> suite,List<ExecutionResult> results,Map<String,Integer> callCount){ boolean hasTimeoutOrTestException=false; for ( ExecutionResult result : results) { if (result.hasTimeout() || result.hasTestException()) { hasTimeo...
Iterate over all execution results and summarize statistics
public VmHostData(String hostName){ this(hostName,false); }
Creates a new VmHostData with its domain controller flag set to <tt>false</tt>
public SparseGraphProjectionBuilder(){ super(new SparseGraphProjectionFactory<G,V,E>()); }
Creates a new SparseGraphProjectionBuilder.
private static Point2f findBackgroundMarker(Mat markers,MatVector contours){ final int cols=markers.cols(); final int rows=markers.rows(); final int minDist=5; Point2f backgroundLabel=new Point2f(); boolean found=false; for (int x=minDist; x < cols - minDist && !found; x++) { for (int y=minDist; y < row...
Finds the first available point to place a background marker for the watershed operation.
public static void sort(char[] array){ sort(0,array.length,array); }
Sorts the specified array in ascending numerical order.
public static List<MgmtTarget> toResponseWithLinksAndPollStatus(final Collection<Target> targets){ if (targets == null) { return Collections.emptyList(); } return targets.stream().map(null).collect(Collectors.toList()); }
Create a response which includes links and pollstatus for all targets.
@Override public void eSet(int featureID,Object newValue){ switch (featureID) { case TypesPackage.TCLASSIFIER__AST_ELEMENT: setAstElement((EObject)newValue); return; case TypesPackage.TCLASSIFIER__DECLARED_COVARIANT_CONSTRUCTOR: setDeclaredCovariantConstructor((Boolean)newValue); return; } super.eSet(featureID,ne...
<!-- begin-user-doc --> <!-- end-user-doc -->
public List transform(Object[] organosProductores){ List ltOrganosProductores=new ArrayList(); if (organosProductores != null) { for (int i=0; i < organosProductores.length; i++) { if (organosProductores[i] instanceof ieci.tdw.ispac.services.dto.OrganoProductor) { ieci.tdw.ispac.services.dto.Organ...
Transforma una lista de organos productores procedentes del API en una lista de objetos que implemementan el interfaz de organos productores
@Override public int hashCode(){ return this.inputStream.hashCode(); }
This implementation returns the hash code of the underlying InputStream.
public static ArtifactCreator makeResourceArtifactCreator(RepositoryManager repoManager,Iterable<? extends File> sourcePaths,Iterable<? extends File> resourcePaths,String resourceRootName,String moduleName,String moduleVersion,boolean verbose,Logger log) throws IOException { return new ResourceArtifactCreatorImpl(rep...
Create and return a new ResourceArtifactCreator.
public void addElement(ErStackTraceElement element){ if (className == null) { declaringClass=element.getDeclaringClass(); if (declaringClass.contains(".")) { className=declaringClass.substring(declaringClass.lastIndexOf(".") + 1); packageName=declaringClass.substring(0,declaringClass.lastIndexOf("...
Add stack trace element
public static PublicKey generatePublicKey(String encodedPublicKey){ try { byte[] decodedKey=Base64.decode(encodedPublicKey); KeyFactory keyFactory=KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch ( NoSuchAlgorithmException e) ...
Generates a PublicKey instance from a string containing the Base64-encoded public key.
private void writeAttribute(java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter,namesp...
Util method to write an attribute without the ns prefix
public static IFile findUmletDiagram(ICompilationUnit unit,String src) throws JavaModelException { IPath imgRef=getRootRelativePath(unit,src); IFile pngFile=getFile(getPackageFragmentRoot(unit),imgRef); IFile uxfFile=getUxfDiagramForImgFile(pngFile); if (uxfFile.exists()) { return uxfFile; } return null...
Return the umlet diagram referenced by the given src attribute value in the given compilation unit.
public BufferAllocator allocator(){ return allocator; }
Returns the underlying buffer allocator.
@Override @Transient public boolean isFullTextSearchable(){ return true; }
Override the gisFeature value.<br> Default to true;<br> If this field is set to false, then the object won't be synchronized with the fullText search engine
public boolean isYear(){ String pt=getPAPeriodType(); if (pt == null) return false; return PAPERIODTYPE_Year.equals(pt); }
Is it Year ?
@SuppressFBWarnings(value="EI_EXPOSE_REP",justification="Returns internal buffer by design") public byte[] readAll() throws IOException { if (pos == 0 && count == buf.length) { pos=count; return buf; } byte[] ret=new byte[count - pos]; super.read(ret); return ret; }
Read all remaining bytes.
public SystemStream(SystemStream other){ this(other.getSystem(),other.getStream()); }
Constructs a Samza stream object based upon an existing Samza stream.
private static boolean equalityConditionPresent(Column column,List<ConditionExpression> conditions){ for ( ConditionExpression cond : conditions) { if (cond instanceof ComparisonCondition) { ComparisonCondition cc=(ComparisonCondition)cond; ColumnExpression colExpr=null; ExpressionNode otherExp...
Check if column has an exact equality conditions
public MBeanNotificationInfo(String[] notifTypes,String name,String description){ this(notifTypes,name,description,null); }
Constructs an <CODE>MBeanNotificationInfo</CODE> object.
public RemoteInterpreterResult(RemoteInterpreterResult other){ if (other.isSetCode()) { this.code=other.code; } if (other.isSetType()) { this.type=other.type; } if (other.isSetMsg()) { this.msg=other.msg; } if (other.isSetConfig()) { this.config=other.config; } if (other.isSetGui()) { ...
Performs a deep copy on <i>other</i>.
public ServiceSchemeException(){ super(); }
Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized.
public static String formatNumber(String source){ SpannableStringBuilder text=new SpannableStringBuilder(source); formatNumber(text,getFormatTypeForLocale(Locale.getDefault())); return text.toString(); }
Breaks the given number down and formats it according to the rules for the country the number is from.
public static void main(final String[] args){ DOMTestCase.doMain(hc_nodetextnodeattribute.class,args); }
Runs this test from the command line.
public Sort weightSort(Sort sort) throws IOException { return (sort != null) ? sort.rewrite(this) : null; }
Returns a weighted sort according to this searcher
public AltRegistry(){ this(null); }
Constructs a new AltRegistry with no default registry configuration.
private void updateTokenScopes(){ boolean chat=client.settings.getBoolean("token_chat"); boolean commercials=client.settings.getBoolean("token_commercials"); boolean editor=client.settings.getBoolean("token_editor"); boolean user=client.settings.getBoolean("token_user"); boolean subscriptions=client.settings....
Updates the token scopes in the GUI based on the settings.
public XMLSignature(Element element,String baseURI) throws XMLSignatureException, XMLSecurityException { this(element,baseURI,false); }
This will parse the element and construct the Java Objects. That will allow a user to validate the signature.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case UmplePackage.ANONYMOUS_TRACE_OPTIONS_1__TRACE_OPTION_1: return ((InternalEList<?>)getTraceOption_1()).basicRemove(otherEnd,msgs); } return super.eInverseRemove(otherEnd,feature...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static ToHitData toHit(IGame game,int attackerId,Targetable target,int leg){ final Entity ae=game.getEntity(attackerId); if (ae == null) return new ToHitData(TargetRoll.IMPOSSIBLE,"You can't attack from a null entity!"); if (!game.getOptions().booleanOption("tacops_jump_jet_attack")) return new ToHitDa...
To-hit number for the specified leg to kick
public void printTree(final EvolutionState state,final int log){ printTree(state,log,Output.V_VERBOSE); }
Prints out the tree in single-line fashion suitable for reading in later by computer. O(n). The default version of this method simply calls child's printRootedTree(...) method.
private void prepareSnapData() throws Exception { log.info("Preparing block snapshots for BlockSnapshotReplicationGroupInstanceMigration"); BlockSnapshot snapshot=new BlockSnapshot(); snapURI=URIUtil.createId(BlockSnapshot.class); groupInstance=UUID.randomUUID().toString(); snapshot.setId(snapURI); snapshot...
Prepares the data for RP volume tests.
public static TextHitInfo afterOffset(int offset){ return new TextHitInfo(offset,true); }
Creates a <code>TextHitInfo</code> at the specified offset, associated with the character after the offset.
default boolean isCleared(){ return false; }
Determines whether the credential value has been securely cleared.
protected final void doTest(IgfsPath inFile,boolean useNewMapper,boolean useNewCombiner,boolean useNewReducer) throws Exception { igfs.delete(new IgfsPath(PATH_OUTPUT),true); JobConf jobConf=new JobConf(); jobConf.set(HadoopCommonUtils.JOB_COUNTER_WRITER_PROPERTY,IgniteHadoopFileSystemCounterWriter.class.getName(...
Does actual test job
public static CallFormat readCall(VariableElement e) throws ProcessorError { ClassParceler parceler=findParceler(e); if (parceler == null) { return null; } return parceler.readCall(); }
Adds read from <code>parcel</code> statement to given <code>method</code>
public static void startWebServer(Connection conn) throws SQLException { WebServer webServer=new WebServer(); Server web=new Server(webServer,new String[]{"-webPort","0"}); web.start(); Server server=new Server(); server.web=web; webServer.setShutdownHandler(server); String url=webServer.addSession(conn);...
Start a web server and a browser that uses the given connection. The current transaction is preserved. This is specially useful to manually inspect the database when debugging. This method return as soon as the user has disconnected.
public Boolean isHttpFirmwareUpgrade(){ return httpFirmwareUpgrade; }
Ruft den Wert der httpFirmwareUpgrade-Eigenschaft ab.
@Override public int lengthOfYear(){ return (isLeapYear() ? 366 : 365); }
Returns the length of the year represented by this date. <p> This returns the length of the year in days, either 365 or 366.
private boolean finalizeBlocks(List<BlockParser> blockParsers){ for (int i=blockParsers.size() - 1; i >= 0; i--) { BlockParser blockParser=blockParsers.get(i); finalize(blockParser); } return true; }
Finalize blocks of previous line. Returns true.
protected IXmlSerializer registerSerializer(Class<?> clazz,IXmlSerializer serializer){ IXmlSerializer old=m_nodeSerializers.get(clazz); m_nodeSerializers.put(clazz,serializer); return old; }
Registers a serializer for a class. There are several "special" classes: null represents the primitive object serializer. Object.class represents the basic object serializer. XSerializable represents the bean serializer.
public boolean matchesThisPacket(DatapathId switchDpid,OFPort inPort,Ethernet packet,AllowDropPair adp){ IPacket pkt=packet.getPayload(); IPv4 pkt_ip=null; TCP pkt_tcp=null; UDP pkt_udp=null; TransportPort pkt_tp_src=TransportPort.NONE; TransportPort pkt_tp_dst=TransportPort.NONE; if (any_dpid == false &&...
Checks if this rule is a match for the incoming packet's MatchFields
public DVector(int c){ vector=new double[Math.max(defaultCapacity,c)]; }
Constructs a new vector with the specified capacity.
public boolean isSortingProperties(){ return sortingProperties; }
Get whether this model is currently sorting properties.
public static void showErrorBox(Exception e){ if (e instanceof IOException) { JOptionPane.showMessageDialog(null,"There was an error contacting Google: " + e.getMessage(),"Error contacting Google",JOptionPane.ERROR_MESSAGE); } else if (e instanceof AuthenticationException) { JOptionPane.showMessageDialog...
Shows a pop-up dialog box alerting the user of an error.
protected PCMFeed(int sampleRate,int channels,int bufferSizeInBytes,PlayerCallback playerCallback){ this.sampleRate=sampleRate; this.channels=channels; this.bufferSizeInBytes=bufferSizeInBytes; this.bufferSizeInMs=bytesToMs(bufferSizeInBytes,sampleRate,channels); this.playerCallback=playerCallback; }
Creates a new PCMFeed object.
public void allocateType(ItemStack drive,ItemStack item,int count){ NBTTagCompound prototype=createPrototype(item); int idx=findDataIndexForPrototype(drive,prototype); if (idx == -1) { NBTTagCompound data=new NBTTagCompound(); data.setTag("Prototype",prototype); data.setInteger("Count",count); Ite...
Forcefully allocates a type for the given item. It is the responsibility of the caller to ensure there is space for the type. Does nothing if there is already an allocation for this type. Allocation will succeed even if the count is zero.
public Iterator<Item> iterator(){ return new ListIterator(); }
Returns an iterator to this stack that iterates through the items in LIFO order.
public String unprunedTipText(){ return "Whether unpruned tree/rules are to be generated."; }
Returns the tip text for this property
public static HistoryEvent createAdded(Recordable recordable,String referrer){ return createAdded(System.currentTimeMillis(),recordable,referrer); }
New history signifying the addition of a recordable, with now as the timestamp.
public entryInfo fileInfo(final String path){ if (this.infoCache.containsKey(path)) { return this.infoCache.get(path); } try { send("STAT " + path); final String reply=receive(); if (isNotPositiveCompletion(reply)) { throw new IOException(reply); } final String[] lines=reply.split("\...
parse LIST of file
private void bfs(int s){ }
Conducts a breadth first search of the maze starting at vertex x.
private boolean isUsed(final String name){ if (name == null) throw new IllegalArgumentException(); return used.containsKey(name); }
Return <code>true</code> if the named index partition has already been "used" by assigning it to participate in some build, split, join, or move operation.
public static boolean createFolder(String folderPath){ if (!TextUtils.isEmpty(folderPath)) { File folder=new File(folderPath); return createFolder(folder); } return false; }
Create a folder, If the folder exists is not created.
synchronized public boolean contains(T item){ if (item == null) return false; for ( Map.Entry<String,List<T>> entry : this.items.entrySet()) { List<T> itemList=entry.getValue(); if (itemList == null) continue; if (itemList.contains(item)) return true; } return false; }
Indicates whether an item is contained in the tree.
private Response<Bitmap> doParse(NetworkResponse response){ byte[] data=response.data; BitmapFactory.Options decodeOptions=new BitmapFactory.Options(); Bitmap bitmap=null; if (mMaxWidth == 0 && mMaxHeight == 0) { decodeOptions.inPreferredConfig=mDecodeConfig; bitmap=BitmapFactory.decodeByteArray(data,0,...
The real guts of parseNetworkResponse. Broken out for readability.
public synchronized void close() throws IOException { if (journalWriter == null) { return; } for ( Entry entry : new ArrayList<Entry>(lruEntries.values())) { if (entry.currentEditor != null) { entry.currentEditor.abort(); } } trimToSize(); journalWriter.close(); journalWriter=null; }
Closes this cache. Stored values will remain on the filesystem.
public static Collection<ClusterNode> remoteNodes(final GridCacheSharedContext ctx,AffinityTopologyVersion topVer){ return ctx.discovery().remoteCacheNodes(topVer); }
Gets remote nodes with at least one cache configured.
private double[][] makeJointVectorForNextPastSource(double[] destination,double[] source){ double[][] destNextPastSourceVectors=new double[destination.length - k][k + 2]; for (int t=k; t < destination.length; t++) { for (int i=0; i < k + 1; i++) { destNextPastSourceVectors[t - k][i]=destination[t - i]; ...
Compute the next, past and source values into a joint vector
public boolean addCertificate(@NotNull X509Certificate certificate){ myWriteLock.lock(); try { if (isBroken()) { return false; } myKeyStore.setCertificateEntry(createAlias(certificate),certificate); flushKeyStore(); myTrustManager=initFactoryAndGetManager(); myDispatcher.getMulticaster...
Add certificate to underlying trust store.
public boolean isCellEditable(int rowIndex,int columnIndex){ return m_editable; }
Is Cell Editable
public static void fill(boolean[] array,boolean value){ for (int i=0; i < array.length; i++) { array[i]=value; } }
Fills the specified array with the specified element.
private void applyThrowsAnnotations(final List<Attribute.TypeCompound> annos){ final List<AnnotatedTypeMirror> thrown=methodType.getThrownTypes(); if (thrown.isEmpty()) { return; } Map<AnnotatedTypeMirror,List<TypeCompound>> typeToAnnos=new LinkedHashMap<>(); for ( final AnnotatedTypeMirror thrownType : ...
For each thrown type, collect all the annotations for that type and apply them