code
stringlengths
10
174k
nl
stringlengths
3
129k
private void importRunnerEnvironment(ImportProject importProject,FolderEntry baseProjectFolder,String defaultRunnerName) throws ForbiddenException, ServerException, ConflictException, IOException { VirtualFileEntry environmentsFolder=baseProjectFolder.getChild(Constants.CODENVY_RUNNER_ENVIRONMENTS_DIR); if (environ...
Imports runners into environments.
public ASN1Primitive toASN1Primitive(){ ASN1EncodableVector v=new ASN1EncodableVector(); v.add(otherRevInfoFormat); v.add(otherRevInfo); return new DERSequence(v); }
Produce an object suitable for an ASN1OutputStream.
public static <T>T assertIsNotNull(T t,String message) throws NullPointerException { if (t == null) throw new NullPointerException(message); else return t; }
Asserts that <tt>t</tt> is not <tt>null</tt> by throwing a <tt>NullPointerException</tt> if it is.
public static RxMarkdown with(String content,Context context){ return new RxMarkdown(content,context); }
get RxMarkdown object
@Override public void distributeScoreToOutlinks(String fromUrl,WebPage row,Collection<ScoreDatum> scoreData,int allCount){ ByteBuffer cashRaw=row.getMetadata().get(CASH_KEY); if (cashRaw == null) { return; } float cash=Bytes.toFloat(cashRaw.array(),cashRaw.arrayOffset() + cashRaw.position()); if (cash == ...
Get cash on hand, divide it by the number of outlinks and apply.
private static int findIndex(ArrayList list,Object o){ int n=list.size(); for (int i=0; i < n; i++) { if (list.get(i) == o) return i; } return -1; }
Finds a object in a list. Should be much faster than indexof
public ArrayStack(){ super(); }
Constructs a new empty <code>ArrayStack</code>. The initial size is controlled by <code>ArrayList</code> and is currently 10.
public boolean hasUnresolvedTypeArgument(){ for (int i=0, varLength=this.substitutes.length; i < varLength; i++) { if (this.substitutes[i] == null) { return true; } } return false; }
Returns true if any unresolved variable is detected, i.e. any variable is substituted with itself
public int size(){ return entries.size(); }
Returns <code>exception_table_length</code>, which is the number of entries in the <code>exception_table[]</code>.
public String nextString(){ _laststring=_values.elementAt(_gen.nextInt()); return _laststring; }
Generate the next string in the distribution.
public static <T1,T2,T3,T4,T5,T6,T7,R>TriFunction<T5,T6,T7,R> partial7(final T1 t1,final T2 t2,final T3 t3,final T4 t4,final HeptFunction<T1,T2,T3,T4,T5,T6,T7,R> heptFunc){ return null; }
Returns a TriFunction with 4 arguments applied to the supplied HeptFunction
public void testCloneNodeNotNamespaceAware() throws Exception { DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(false); builder=factory.newDocumentBuilder(); document=builder.parse(new InputSource(new StringReader("<menu " + "xmlns:f=\"http://food\" xmlns:a=\"http:...
We can't use the namespace-aware factory method for non-namespace-aware nodes. http://code.google.com/p/android/issues/detail?id=2735
public boolean isGeneratedNode(AllocNode node){ if (node.getType() instanceof RefType) { return classesAdded.contains(((RefType)node.getType()).getSootClass()); } return false; }
Is this node of a created class type?
public void paint(Graphics2D g){ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); origAlpha=1.0f; Composite origComposite=g.getComposite(); if (origComposite instanceof AlphaComposite) { AlphaComposite origAlphaComposite=(AlphaComposite)origComposite; if (origAlphaC...
Paints the transcoded SVG image on the specified graphics context. You can install a custom transformation on the graphics context to scale the image.
public ObjectWriter withDefaultPrettyPrinter(){ return withPrettyPrinter(new DefaultPrettyPrinter()); }
Method that will construct a new instance that will use the default pretty printer for serialization.
public EducationalBackground qualifications(List<String> qualifications){ this.qualifications=qualifications; return this; }
Sets the list of qualifications.
private void startRoomActivity(){ if (null != mCall) { String roomId=mCall.getRoom().getRoomId(); Intent intent=new Intent(getApplicationContext(),VectorRoomActivity.class); intent.putExtra(VectorRoomActivity.EXTRA_ROOM_ID,roomId); intent.putExtra(VectorRoomActivity.EXTRA_MATRIX_ID,mMatrixId); sta...
Helper method to start the room activity.
public synchronized ZooKeeperClientBuilder name(String name){ this.name=name; return this; }
Set zookeeper client name
public Grant(String name){ super(name); }
Create a new Grant.
public static String formatMillis(int millis){ String result=""; int hr=millis / 3600000; millis%=3600000; int min=millis / 60000; millis%=60000; int sec=millis / 1000; if (hr > 0) { result+=hr + ":"; } if (min >= 0) { if (min > 9) { result+=min + ":"; } else { result+="0" + m...
Formats time in milliseconds to hh:mm:ss string format.
public static void init(ILog logProxy){ LogImpl.setLogProxy(logProxy); }
Init with context and log class.
boolean isWritingEncryptedData(){ return writingEncryptedData; }
Check if we are writing encrypted data.
public boolean isDeltaCRLIndicatorEnabled(){ return deltaCRLIndicator; }
Returns if this selector must match CRLs with the delta CRL indicator extension set. Defaults to <code>false</code>.
public MongoClient clientForMembers(ServerAddress... seeds){ List<ServerAddress> addresses=new ArrayList<>(); for ( ServerAddress seedAddress : seeds) { if (seedAddress != null) addresses.add(seedAddress); } return clientForMembers(addresses); }
Obtain a client connection to the replica set or cluster. The supplied addresses are used as seeds, and once a connection is established it will discover all of the members.
public ForwardSeekableStream(InputStream src){ this.src=src; }
Constructs a <code>InputStreamForwardSeekableStream</code> from a regular <code>InputStream</code>.
public boolean isTransformStackValid(){ return transformStackValid; }
Checks the status of the transform stack
public String fromNodeString(){ return "<--- " + _fromNode; }
Returns the string representation of the start node (used for printing).
private boolean enableClockStats(boolean clockStatsEnabled){ boolean oldValue=CachePerfStats.enableClockStats; CachePerfStats.enableClockStats=clockStatsEnabled; return oldValue; }
Enables clock stats.
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (xmlWriter.getPrefix(namespace) == null) { xmlWriter.writeNamespace(prefix,namespace); x...
Util method to write an attribute with the ns prefix
public static String encode(byte[] source,int off,int len,byte[] alphabet,boolean doPadding){ byte[] outBuff=encode(source,off,len,alphabet,Integer.MAX_VALUE); int outLen=outBuff.length; while (doPadding == false && outLen > 0) { if (outBuff[outLen - 1] != '=') { break; } outLen-=1; } return...
Encodes a byte array into Base64 notation.
public static void hshaServer(PacketStreamer.Processor<PacketStreamerHandler> processor){ try { TNonblockingServerTransport serverTransport=new TNonblockingServerSocket(port); THsHaServer.Args args=new THsHaServer.Args(serverTransport); args.processor(processor); args.transportFactory(new TFramedTrans...
The function to create a thrift Half-Sync and Half-Async Server.
public long simpleQueryForLong(){ return simpleQuery().getLong(); }
Execute the query and return the value of the first column and row as a long.
protected TileInfo createTileInfo(DrawContext dc){ Dimension tileDimension=this.computeTextureTileDimension(dc); LevelSet levelSet=this.getLevelSet(tileDimension.width,tileDimension.height); String cacheName=this.uniqueCacheName(); return new TileInfo(levelSet,cacheName,tileDimension.width,tileDimension.height)...
Creates a tile info associated with the specified draw context.
public static List<Point> SpatialKnnQuery(PointRDD pointRDD,Point queryCenter,Integer k){ @SuppressWarnings("serial") JavaRDD<Point> tmp=pointRDD.getRawPointRDD().mapPartitions(new PointKnnJudgement(queryCenter,k)); return tmp.takeOrdered(k,new PointDistanceComparator(queryCenter)); }
Spatial K Nearest Neighbors query
public static void main(String[] args) throws IOException { createCurrentVersionFiles(new File(args[0])); }
Point at <code>test/com/rtg/reader/resources</code> directory
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public Object readReply(Class expectedClass) throws Throwable { int tag=read(); if (tag != 'r') error("expected hessian reply at " + codeName(tag)); int major=read(); int minor=read(); tag=read(); if (tag == 'f') throw prepareFault(); else { _peek=tag; Object value=readObject(expectedClass); ...
Reads a reply as an object. If the reply has a fault, throws the exception.
private AddressingModeThreeGenerator(){ }
right now we assume that the AddressModeTwoGenerator produces the same results for the Cases matching AddressModeThree so there is no need to write this AddressModeGenerator currently
void updateActivity(){ timeSinceLastUpdate=System.currentTimeMillis(); }
This method prevents a manual timeout from occurring when invoked at a frequency faster than the timeout.
public ClusterRenderer(Clusters clusters,List<String> varNames){ if (clusters == null) { throw new NullPointerException(); } if (varNames == null) { throw new NullPointerException(); } this.clusters=clusters; this.varNames=varNames; this.numClusters=clusters.getNumClusters(); setLayout(new Borde...
Constructs an editor to allow the user to assign variables to clusters, showing a list of variables to choose from.
@Override public int hashCode(){ int hc=hashCodeValue; if (hc == 0) { hc=baseLocale.hashCode(); if (localeExtensions != null) { hc^=localeExtensions.hashCode(); } hashCodeValue=hc; } return hc; }
Override hashCode. Since Locales are often used in hashtables, caches the value for speed.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
private static boolean useGoogleLocationSettings(Context context){ if (!isEnforceable(context)) { return false; } if (!ApiAdapterFactory.getApiAdapter().hasLocationMode()) { return true; } else { return getUseLocationForServices(context) == USE_LOCATION_FOR_SERVICES_OFF; } }
Returns true to use the google location settings.
public void mouseExited(MouseEvent e){ ((MouseListener)a).mouseExited(e); ((MouseListener)b).mouseExited(e); }
Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
protected void sequence_Script(ISerializationContext context,Script semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: Script returns Script Constraint: (annotations+=ScriptAnnotation* scriptElements+=ScriptElement*)
static void runLater(Runnable r){ NativePlatformFactory.getNativePlatform().getRunnableProcessor().invokeLater(r); }
Posts a Runnable to the JavaFX event queue using the global RunnableProcessor.
protected Command processPacketIn(IOFSwitch sw,OFPacketIn msg,FloodlightContext cntx){ Ethernet eth=IFloodlightProviderService.bcStore.get(cntx,IFloodlightProviderService.CONTEXT_PI_PAYLOAD); Command ret=Command.STOP; String srcNetwork=macToGuid.get(eth.getSourceMACAddress()); if (eth.isBroadcast() || eth.isMul...
Processes an OFPacketIn message and decides if the OFPacketIn should be dropped or the processing should continue.
@Override protected EClass eStaticClass(){ return N4JSPackage.Literals.SUPER_LITERAL; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public CommunicationException(String arg0,Throwable arg1){ super(arg0,arg1); }
Creates a new instance of CommunicationException.
public static boolean isHeader(Header hdr){ return hdr.getBooleanValue(ZTABLE,false); }
Check that this HDU has a valid header for this type.
@Override public Enumeration<Option> listOptions(){ Vector<Option> newVector=new Vector<Option>(2); newVector.addElement(new Option("\tThe name of the field to average over.\n" + "\t(default \"Fold\")","F",1,"-F <field name>")); newVector.addElement(new Option("\tThe number of results expected per average.\n" + "...
Returns an enumeration describing the available options..
public Folder(Context context,AttributeSet attrs){ super(context,attrs); LauncherAppState app=LauncherAppState.getInstance(); DeviceProfile grid=app.getDynamicGrid().getDeviceProfile(); setAlwaysDrawnWithCacheEnabled(false); mInflater=LayoutInflater.from(context); mIconCache=app.getIconCache(); Resources ...
Used to inflate the Workspace from XML.
public Object assertOneGetOldAndReset(){ ScopeTestHelper.assertTrue("Listener invocation not received but expected",isInvoked); ScopeTestHelper.assertEquals("Mismatch in the number of invocations",1,newDataList.size()); ScopeTestHelper.assertEquals("Mismatch in the number of invocations",1,oldDataList.size()); ...
Asserts that exactly one remove stream event was received and no insert stream events, resets the listener clearing all state and returns the received event.
public LruCache(Context context){ this(Utils.calculateMemoryCacheSize(context)); }
Create a cache using an appropriate portion of the available RAM as the maximum size.
public static <T>TestResult<T> timeTasks(int nThreads,Callable<T> task) throws InterruptedException { return timeTasks(nThreads,task,"Thread"); }
Executes a task, on N threads, all starting at the same time.
public final void init(Key key,SecureRandom random) throws InvalidKeyException { if (spi != null) { spi.engineInit(key,random); } else { try { chooseProvider(I_NO_PARAMS,key,null,random); } catch ( InvalidAlgorithmParameterException e) { throw new InvalidKeyException(e); } } if ...
Initializes this key agreement with the given key and source of randomness. The given key is required to contain all the algorithm parameters required for this key agreement. <p> If the key agreement algorithm requires random bytes, it gets them from the given source of randomness, <code>random</code>. However, if the ...
DownloadCallback downloadCallback(){ return downloadCallback; }
Get the download callback of this request.
private ListenerWrapper(final IDebuggerContainerListener listener){ m_listener=listener; }
Creates a new wrapper object.
public static boolean defaultReuseAddress(){ return Constants.WINDOWS ? false : true; }
Returns system default for SO_REUSEADDR
public void clear(){ Node<K,V>[] tab; modCount++; if ((tab=table) != null && size > 0) { size=0; for (int i=0; i < tab.length; ++i) tab[i]=null; } }
Removes all of the mappings from this map. The map will be empty after this call returns.
public synchronized void activityStop(){ if (this.spinnerDialog != null) { this.spinnerDialog.dismiss(); this.spinnerDialog=null; } }
Stop spinner.
public NotificationChain basicSetExpression(Expression newExpression,NotificationChain msgs){ Expression oldExpression=expression; expression=newExpression; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,N4JSPackage.WITH_STATEMENT__EXPRESSION,oldExpre...
<!-- begin-user-doc --> <!-- end-user-doc -->
public final void init(final CharSequence text,int start,int end,@Nullable final Kind kind){ myKind=kind; myText=text; myStart=start; myEnd=end; }
Updates occurrence with the specified text fragment and kind.
public void init(boolean forEncryption,CipherParameters params) throws IllegalArgumentException { this.forEncryption=forEncryption; reset(); if (params instanceof ParametersWithRandom) { ParametersWithRandom p=(ParametersWithRandom)params; padding.init(p.getRandom()); cipher.init(forEncryption,p.getPa...
initialise the cipher.
GridClientDataFactory(Set<GridClientCacheFlag> flags){ this.flags=flags; }
Factory which creates projections with given flags.
public void addCallBack(Provider provider,String callBack){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { if (Objects.equals(provider.name(),Constants.FACEBOOK) || Objects.equals(provider.name(),Constants.LINKEDIN) || Objects.equals(provider.name(),Constants.MYSPACE)|| Objects.equals(provider.name(),...
Adds callback URL
public void addGlobPattern(final String pattern){ globMatchers.add(new GlobMatcher(pattern)); }
Adds a glob pattern to the glob patterns checked by this class.
public boolean isSignificant(){ return true; }
This default implementation returns true.
public Object runSafely(Catbert.FastStack stack) throws Exception { return getEditorial(stack).getTitle(); }
Returns the title for the specified TVEditorial
public String toString(){ String numStr=Long.toBinaryString(xBits); String zero64="0000000000000000000000000000000000000000000000000000000000000000"; String padStr=zero64 + numStr; String bitStr=padStr.substring(padStr.length() - 64); String str=bitStr.substring(0,1) + " " + bitStr.substring(1,12)+ "("+ getE...
A representation of the Double bits formatted for easy readability
public Query prepareQueryforDefaultersReport(final Long wardId,final String fromDemand,final String toDemand,final Integer limit,final String ownerShipType){ final StringBuffer query=new StringBuffer(300); query.append("select pmv from PropertyMaterlizeView pmv where pmv.propertyId is not null and pmv.isActive = tr...
Prepare query for Defaulters report
private JCExpression makeMetafactoryIndyCall(TranslationContext<?> context,int refKind,Symbol refSym,List<JCExpression> indy_args){ JCFunctionalExpression tree=context.tree; MethodSymbol samSym=(MethodSymbol)types.findDescriptorSymbol(tree.type.tsym); List<Object> staticArgs=List.<Object>of(typeToMethodType(samSy...
Generate an indy method call to the meta factory
@Override public void command(){ synchronized (this) { cachedCollections=null; } }
Called after a ZooKeeper session expiration occurs
public boolean trim(){ if (bits.length == numWords(length)) return false; bits=LongArrays.setLength(bits,numWords(length)); return true; }
Reduces as must as possible the size of the backing array.
public void insertBack(int x){ if (size == items.length) { resize((int)(size * 1.01)); } items[size]=x; size=size + 1; }
Inserts X into the back of the list.
@RequestMapping(value={"/","/login","/home","/settings","/jobs","/traces/**","/404"},method=RequestMethod.GET) public String index(){ return "index"; }
Assumes that the root URL should use a template named "index", which presumably will setup the Angular app.
public boolean isEmpty(){ return n == 0; }
Returns true if this priority queue is empty.
public void reportJSException(String instanceId,String function,String exception){ if (WXEnvironment.isApkDebugable()) { WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId + ", exception function:"+ function+ ", exception:"+ exception); } StringBuilder errorMsg=new StringBuilder(); WXSDKInstance...
Report JavaScript Exception
public boolean isA_Transfer_Balance(){ Object oo=get_Value(COLUMNNAME_A_Transfer_Balance); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get A_Transfer_Balance.
private boolean containsSingleMetric(BufferedReader reader) throws FormatParseException { try { reader.mark(1); char firstChar=(char)reader.read(); reader.reset(); return firstChar == '{'; } catch ( IOException e) { throw new FormatParseException("IOException while determining if single or mul...
Determines if the given reader contains a single or multiple metrics.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:51.205 -0500",hash_original_method="6DABC4D6488D8CA07EA47E3AEA2A5D8B",hash_generated_method="48ECFDAC0E20ADB9B68E16251B33DD0D") public synchronized void removeListeningPoints(){ for (Iterator it=this.listeningPoints.values().itera...
Remove all the listening points for this sip provider. This is called when the stack removes the Provider
public String format(int number,int decimalPlaces){ StringBuilder sb=new StringBuilder(); int paddingRequired=decimalPlaces - (String.valueOf(number).length()); for (int x=0; x < paddingRequired; x++) { sb.append("0"); } sb.append(number); return sb.toString(); }
Pads an integer value with additional zeroes to make it decimalPlaces long
public final boolean postAtFrontOfQueue(Runnable r){ return mExec.postAtFrontOfQueue(wrapRunnable(r)); }
Posts a message to an object that implements Runnable. Causes the Runnable r to executed on the next iteration through the message queue. The runnable will be run on the thread to which this handler is attached. <b>This method is only for use in very special circumstances -- it can easily starve the message queue, caus...
public static void print(CtClass clazz,PrintStream stream){ (new FramePrinter(stream)).print(clazz); }
Prints all the methods declared in the given class.
public void testSuccessWithFailureThreshold(){ CircuitBreaker breaker=new CircuitBreaker().withFailureThreshold(3); breaker.halfOpen(); HalfOpenState state=new HalfOpenState(breaker); assertFalse(breaker.isOpen()); assertFalse(breaker.isClosed()); state.recordFailure(); state.recordSuccess(); assertTrue...
Asserts that the the circuit is closed after a single success.
public void removeListener(final BreakpointManagerListener listener){ listeners.removeListener(listener); }
Remove a breakpoint listener from the list of listeners that are notified about changes in the breakpoint manager.
private Eml convertMetadataToEml(Dataset metadata){ Eml eml=new Eml(); if (metadata != null) { eml.setTitle(metadata.getTitle()); if (metadata.getDescription() != null) { for ( String para : Splitter.onPattern("\r?\n").trimResults().omitEmptyStrings().split(metadata.getDescription())) { e...
Populate an Eml instance from a Dataset object that was created from a Dublin Core metadata document, or another basic metadata format. Note: only a small number of fields actually contain data.
public void writeAttribute(String name,Object value,String componentPropertyName) throws IOException { if (name == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID,"name")); } if (value == null) { throw new NullPointerException(Mes...
<p>Write a properly escaped attribute name and the corresponding value. The value text will be converted to a String if necessary. This method may only be called after a call to <code>startElement()</code>, and before the opened element has been closed.</p>
public boolean isCellEditable(int rowIndex,int columnIndex){ return columnIndex == 1; }
Returns true if the cell at <code>rowIndex</code> and <code>columnIndex</code> is editable. Otherwise, <code>setValueAt</code> on the cell will not change the value of that cell.
public boolean isEmpty(){ return (getSelection() == null); }
Reports whether the current selection contains any objects.
public void publish(ModelQuery query){ Map<String,Object> paramsToSend=prepareData(query); publish(paramsToSend); }
send a ModelQuery to the current session front end AngularBean proxy to update his models
private Font styleFont(final Label label,final int style){ final FontData[] fontData=label.getFont().getFontData(); for (int i=0; i < fontData.length; i++) { fontData[i].setStyle(fontData[i].getStyle() | style); } return new Font(label.getDisplay(),fontData); }
Create a new font based of the existing font of the specified label. Add the additional style to the new font.
public IndicatorTreeElementLabelProvider(IndicatorViewPart viewPart){ this.viewPart=viewPart; }
Constructs a IndicatorTreeElementLabelProvider with a given indicator outline view.
@SuppressWarnings({"unchecked","rawtypes"}) public T adapter(Adapter adapter){ if (view instanceof AdapterView) { AdapterView av=(AdapterView)view; av.setAdapter(adapter); } return self(); }
Set the adapter of an AdapterView.
public FixedSizeThumbnailMaker keepAspectRatio(boolean keep){ if (ready.isSet(PARAM_KEEP_RATIO)) { throw new IllegalStateException("Whether to keep the aspect ratio has already been set."); } this.keepRatio=keep; ready.set(PARAM_KEEP_RATIO); return this; }
Sets whether or not the thumbnail is to maintain the aspect ratio of the original image.
public void evaluate(final EvolutionState state,final int thread,final GPData input,final ADFStack stack,final GPIndividual individual,final Problem problem,final int argument){ if (argument >= adf.children.length || argument < 0) { individual.printIndividual(state,0); state.output.fatal("Invalid argument num...
Evaluates the argument number in the current context
public static Wallet fromKeys(NetworkParameters params,List<ECKey> keys){ for ( ECKey key : keys) checkArgument(!(key instanceof DeterministicKey)); KeyChainGroup group=new KeyChainGroup(params); group.importKeys(keys); return new Wallet(params,group); }
Creates a wallet containing a given set of keys. All further keys will be derived from the oldest key.
private static boolean isNewArrayAllZeroDims(NewArrayTree node){ boolean isAllZeros=true; for ( ExpressionTree dim : node.getDimensions()) { if (dim instanceof LiteralTree) { Object val=((LiteralTree)dim).getValue(); if (!(val instanceof Number) || !(new Integer(0).equals(val))) { isAllZero...
Determine whether all dimensions given in a new array expression have zero as length. For example "new Object[0][0];". Also true for empty dimensions, as in "new Object[] {...}".
private void invalidateElementsByTagName(Node node){ if (node.getNodeType() != ELEMENT_NODE) { return; } AbstractDocument ad=getCurrentDocument(); String ns=node.getNamespaceURI(); String nm=node.getNodeName(); String ln=(ns == null) ? node.getNodeName() : node.getLocalName(); for (Node n=this; n != n...
Invalidates the ElementsByTagName objects of this node and its parents.
private String readNfcErrorMsg(ByteBuffer reply) throws IOException { int errorType=reply.getInt(); int errorCode=reply.getInt(); int msgLen=reply.getInt(); if (msgLen == 0) { return ""; } ByteBuffer msgBuffer=ByteBuffer.allocate(msgLen); readFully(msgBuffer); String errorMsg=new String(msgBuffer.ar...
Read NFC error from reply message.