code
stringlengths
10
174k
nl
stringlengths
3
129k
public void addClusterConnection(SimpleString name,DiscoveryGroupConfiguration dg,ClusterConnectionConfiguration config){ ServerLocatorImpl serverLocator=(ServerLocatorImpl)ActiveMQClient.createServerLocatorWithHA(dg); configAndAdd(name,serverLocator,config); }
add a locator for a cluster connection.
public void centerDialog(){ final Toolkit toolkit=Toolkit.getDefaultToolkit(); final Dimension screenSize=toolkit.getScreenSize(); final int x=(screenSize.width - getWidth()) / 2; final int y=(screenSize.height - getHeight()) / 2; setLocation(x,y); }
Center the dialog on the screen.
public static String convertToHTMLContent(String content){ content=replace(content,'&',"&amp;"); content=replace(content,'"',"&quot;"); content=replace(content,'<',"&lt;"); return replace(content,'>',"&gt;"); }
Escapes reserved HTML characters in the given string. <p> <b>Warning:</b> Does not preserve whitespace.
private Object convertValueToTypeIfNecessary(String name,Object value,PropertyDescriptor[] pd){ for ( PropertyDescriptor aPd : pd) { if (aPd.getName().equals(name)) { value=getExpressionFactory().coerceToType(value,aPd.getPropertyType()); break; } } return value; }
Helper method to convert a value to a type as defined in PropertyDescriptor(s)
public Segment truncate(long index){ assertSegmentOpen(); Assert.index(index >= manager.commitIndex(),"cannot truncate committed index"); long offset=relativeOffset(index); long lastOffset=offsetIndex.lastOffset(); long diff=Math.abs(lastOffset - offset); skip=Math.max(skip - diff,0); if (offset < lastOff...
Truncates entries after the given index.
public static String buildNodeName(InetAddress addr){ String hostname=addr.getHostName(); if (hostname != null) return hostname; return String.format(Locale.getDefault(),"node%03d%03d%03d%03d",(int)(addr.getAddress()[0] & 0xFF),(int)(addr.getAddress()[1] & 0xFF),(int)(addr.getAddress()[2] & 0xFF),(int)(addr.get...
TODO: provide customizable node name factory.
public static String mangleNativeMethod(String owner,String name){ return mangleNativeMethod(owner,name,null); }
Returns the short version of the JNI function name for a method.
public static Ed25519GroupElement precomputed(final Ed25519FieldElement yPlusx,final Ed25519FieldElement yMinusx,final Ed25519FieldElement xy2d){ return new Ed25519GroupElement(CoordinateSystem.PRECOMPUTED,yPlusx,yMinusx,xy2d,null); }
Creates a new group element using the PRECOMPUTED coordinate system.
private void put(final Item i){ if (index + typeCount > threshold) { int ll=items.length; int nl=ll * 2 + 1; Item[] newItems=new Item[nl]; for (int l=ll - 1; l >= 0; --l) { Item j=items[l]; while (j != null) { int index=j.hashCode % newItems.length; Item k=j.next; j...
Puts the given item in the constant pool's hash table. The hash table <i>must</i> not already contains this item.
protected PropertyNameOwnerImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
@SuppressWarnings("unchecked") public void writeArray(Array x) throws SQLException { if (x == null) { attribs.add(null); } else { attribs.add(new SerialArray(x,map)); } }
Writes an <code>Array</code> object in the Java programming language to this <code>SQLOutputImpl</code> object. The driver converts this value to a serializable <code>SerialArray</code> SQL <code>ARRAY</code> value before returning it to the database.
@After public void tearDown() throws Exception { TradestrategyTest.clearDBData(); }
Method tearDown.
public String format(int indent){ try { boolean useIndentAmount=false; TransformerFactory factory=TransformerFactory.newInstance(); if (indent != -1) { try { factory.setAttribute("indent-number",indent); } catch ( IllegalArgumentException e) { useIndentAmount=true; ...
Format this XML data as a String.
public final double prob(int classIndex,int intIndex){ if (Utils.gr(m_perBag[intIndex],0)) { return m_perClassPerBag[intIndex][classIndex] / m_perBag[intIndex]; } else { return prob(classIndex); } }
Returns relative frequency of class for given bag.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public static String toArrayString(Object[] self){ return (self == null) ? "null" : InvokerHelper.toArrayString(self); }
Returns the string representation of the given array. The string displays the contents of the array, similar to an array literal, i.e. <code>{1, 2, "a"}</code>.
public Organization(){ }
Constructs empty organization.
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response){ processGetRequest(request,response); }
Handles the HTTP <code>POST</code> method.
private void action_treeDelete(ListItem item){ log.info("Item=" + item); if (item != null) { SimpleTreeModel model=(SimpleTreeModel)centerTree.getModel(); SimpleTreeNode stn=model.find(model.getRoot(),item.id); if (stn != null) model.removeNode(stn); deleteNode(item); } }
Action: Delete Node from Tree
void disconnect(){ synchronized (lock) { disconnected=true; lock.notifyAll(); } }
Disconnect this stream from all connection activity.
public int mapDcdColumnID(int colID){ for (int i=0; i < _dcdColumnMap.length; i++) { int st=(i == 0 ? 1 : _dcdColumnMap[i - 1] + 1 + 1); int end=_dcdColumnMap[i] + 1; if (colID >= st && colID <= end) return i + 1; } return -1; }
Given a dummycoded column id, find the corresponding original column ID.
private int extend(final int required){ final int capacity=Math.max(required,capacity() * 2); if (log.isDebugEnabled()) log.debug("Extending buffer to capacity=" + capacity + " bytes."); return capacity; }
Return the new capacity for the buffer (default is always large enough and will normally double the buffer capacity each time it overflows).
private CBatchPluginExecuter(){ }
You are not supposed to instantiate this.
private synchronized void rebuildJournal() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer=new BufferedWriter(new FileWriter(journalFileTmp),IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write(VERSION_1); writer.write("\n"); writer.write(In...
Creates a new journal that omits redundant information. This replaces the current journal if it exists.
public ExceptionTable copy(ConstPool newCp,Map classnames){ ExceptionTable et=new ExceptionTable(newCp); ConstPool srcCp=constPool; int len=size(); for (int i=0; i < len; ++i) { ExceptionTableEntry e=(ExceptionTableEntry)entries.get(i); int type=srcCp.copy(e.catchType,newCp,classnames); et.add(e.sta...
Makes a copy of this <code>exception_table[]</code>. Class names are replaced according to the given <code>Map</code> object.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:06.244 -0500",hash_original_method="99713AAB8FDC91BA4FFF953154B93F70",hash_generated_method="41CB867DCDD72D9ED89078F64DB12175") public boolean quickReject(Rect r){ return...
Return true if the region is empty, or if the specified rectangle does not intersect the region. Returning false is not a guarantee that they intersect, but returning true is a guarantee that they do not.
protected MkTabEntry createNewLeafEntry(DBID id,O object,double parentDistance){ return new MkTabLeafEntry(id,parentDistance,knnDistances(object)); }
Creates a new leaf entry representing the specified data object in the specified subtree.
public void debug(String message,Object... args){ logger.debug(message,args); }
Log a debug level message.
public Result_NB(String title,ResultModel resultModel){ super(title); this.attacks=resultModel.getAttacks(); btnController=new ResultButtonController(resultModel); chart=ChartHelper.createDumyChart(); initComponents(); resultTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION)...
Creates new form Result_NB
PolicyChecker(Set<String> initialPolicies,int certPathLen,boolean expPolicyRequired,boolean polMappingInhibited,boolean anyPolicyInhibited,boolean rejectPolicyQualifiers,PolicyNodeImpl rootNode){ if (initialPolicies.isEmpty()) { this.initPolicies=new HashSet<String>(1); this.initPolicies.add(ANY_POLICY); } ...
Constructs a Policy Checker.
public void replaceFromToWithFrom(int from,int to,AbstractCharList other,int otherFrom){ if (!(other instanceof CharArrayList)) { super.replaceFromToWithFrom(from,to,other,otherFrom); return; } int length=to - from + 1; if (length > 0) { checkRangeFromTo(from,to,size()); checkRangeFromTo(otherFr...
Replaces a number of elements in the receiver with the same number of elements of another list. Replaces elements in the receiver, between <code>from</code> (inclusive) and <code>to</code> (inclusive), with elements of <code>other</code>, starting from <code>otherFrom</code> (inclusive).
protected void addImpl(Component comp,Object constraints,int index){ if (comp instanceof Separator) { if (getOrientation() == VERTICAL) { ((Separator)comp).setOrientation(JSeparator.HORIZONTAL); } else { ((Separator)comp).setOrientation(JSeparator.VERTICAL); } } super.addImpl(comp,constra...
If a <code>JButton</code> is being added, it is initially set to be disabled.
private void mapCgJournals(UnManagedProtectionSet unManagedProtectionSet,GetCGsResponse cg,Map<String,String> rpCopyAccessStateMap,Map<String,String> rpWwnToNativeWwn,List<String> storageNativeIdPrefixes,DbClient dbClient){ for ( GetCopyResponse copy : cg.getCopies()) { String accessState=copy.getAccessState(); ...
Update (if it exists) the journal UnManagedVolume objects with RP information needed for ingestion
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:20.192 -0500",hash_original_method="C42EF88CC3B7717E7A29DDD6EED6CD2B",hash_generated_method="D3A89CF00F564A9CFE02EBD6D8219414") public boolean clipRect(int left,int top,int...
Intersect the current clip with the specified rectangle, which is expressed in local coordinates.
private SecureRandom createSecureRandom(){ SecureRandom result=null; long t1=System.currentTimeMillis(); if (secureRandomClass != null) { try { Class<?> clazz=Class.forName(secureRandomClass); result=(SecureRandom)clazz.newInstance(); } catch ( Exception e) { log.error("Cannot load s...
Create a new random number generator instance we should use for generating session identifiers.
public static synchronized int generateLocalMsrpPort(RcsSettings rcsSettings){ return generateLocalTcpPort(rcsSettings.getDefaultMsrpPort()); }
Generate a default free MSRP port number
public FixedWidthTextTableSchema(){ }
Creates a new, initially empty FixedWidthTextTableSchema.
@Override public Token recoverInline(Parser recognizer) throws RecognitionException { Token token=recognizer.getCurrentToken(); String message="unexpected token " + getTokenErrorDisplay(token) + " on line ("+ token.getLine()+ ") position ("+ token.getCharPositionInLine()+ ")"+ " was expecting one of "+ recognizer.g...
Ensures the ANTLR parser will throw an exception after the first error
private static FreeFormPointSet fromValidatedGeoJson(InputStream is,int n){ JsonFactory f=new MappingJsonFactory(); FreeFormPointSet ret=new FreeFormPointSet(n); int index=0; try { JsonParser jp=f.createParser(is); JsonToken current=jp.nextToken(); while (jp.nextToken() != JsonToken.END_OBJECT) { ...
Reads with a combination of streaming and tree-model to allow very large GeoJSON files. The JSON should be already validated, and you must pass in the maximum number of features from that validation step.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public OGLRenderToTextureSupport(){ this.isFramebufferObjectEnabled=true; this.stackHandler=new OGLStackHandler(); }
Constructs a new OGLRenderToTextureSupport, but otherwise does nothing.
public NodeList(){ nodes=new ArrayList(); }
Creates an empty node list.
public final void removeEditorListener(EditorListener l){ listeners.remove(EditorListener.class,l); }
Delete from State listener
public SearchType searchType(){ return searchType; }
The tye of search to execute.
@Override public void replaceSelection(String content){ if (!isEditable()) { UIManager.getLookAndFeel().provideErrorFeedback(JEditorPane.this); return; } EditorKit kit=getEditorKit(); if (kit instanceof StyledEditorKit) { try { Document doc=getDocument(); Caret caret=getCaret(); bo...
Replaces the currently selected content with new content represented by the given string. If there is no selection this amounts to an insert of the given text. If there is no replacement text (i.e. the content string is empty or <code>null</code>) this amounts to a removal of the current selection. The replacement t...
public static void generateDOTofCFG(String inputFile,String outputDir,String method,String clas,boolean pdf){ generateDOTofCFG(inputFile,outputDir,method,clas,pdf,null); }
Just like method above but without analysis.
public SymbolTableEntryInternal steFor_Array(){ return getSymbolTableEntryInternal("Array",true); }
"Array" - retrieve the internal symbol table entry for the symbol "Array"
private double binomialCoefficient(final int n,final int k){ return Math.floor(0.5 + Math.exp(binomialCoefficientLn(n,k))); }
Computes the binomial coefficient.
public ExponentialPower(double tau,RandomEngine randomGenerator){ setRandomGenerator(randomGenerator); setState(tau); }
Constructs an Exponential Power distribution. Example: tau=1.0.
public void expandToInclude(double x,double y){ if (isNull()) { minx=x; maxx=x; miny=y; maxy=y; } else { if (x < minx) { minx=x; } if (x > maxx) { maxx=x; } if (y < miny) { miny=y; } if (y > maxy) { maxy=y; } } }
Enlarges this <code>Envelope</code> so that it contains the given point. Has no effect if the point is already on or within the envelope.
@Override public void mouseClicked(MouseEvent e){ int col; boolean popup; col=m_TableData.columnAtPoint(e.getPoint()); popup=((e.getButton() == MouseEvent.BUTTON3) && (e.getClickCount() == 1)) || ((e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 1) && e.isAltDown()&& !e.isControlDown()&& !e.isShif...
Invoked when a mouse button has been pressed and released on a component
public void removeChangeListener(ChangeListener l){ listenerList.remove(ChangeListener.class,l); }
Removes a ChangeListener from the button.
private IPiece createPiece(Context ctx,Scope parent,ForeignKey foreignKey) throws ScopeException, SQLScopeException { List<ExpressionAST> joins=new LinkedList<ExpressionAST>(); for ( KeyPair pair : foreignKey.getKeys()) { joins.add(ExpressionMaker.EQUAL(new ColumnReference(pair.getPrimary()),new ColumnReferenc...
create a reference to a foreignKey
protected void findNearestNeighbours(Instance target,KDTreeNode node,int k,MyHeap heap,double distanceToParents) throws Exception { if (node.isALeaf()) { if (m_TreeStats != null) { m_TreeStats.updatePointCount(node.numInstances()); m_TreeStats.incrLeafCount(); } double distance; for (int i...
Returns (in the supplied heap object) the k nearest neighbours of the given instance starting from the give tree node. &gt;k neighbours are returned if there are more than one neighbours at the kth boundary. NOTE: This method should not be used from outside this class. Outside classes should call kNearestNeighbour...
public void transform(Vector3 v){ tmp2.set(this); tmp2.conjugate(); tmp2.mulLeft(tmp1.set(v.x,v.y,v.z,0)).mulLeft(this); v.x=tmp2.x; v.y=tmp2.y; v.z=tmp2.z; }
Transforms the given vector using this quaternion
public static _Fields findByThriftIdOrThrow(int fieldId){ _Fields fields=findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
public PaletteCMYKChooser(){ }
Creates new form.
private CreateVirtualNetworkWorkflowDocument buildPatch(TaskState.TaskStage stage,CreateVirtualNetworkWorkflowDocument.TaskState.SubStage subStage){ CreateVirtualNetworkWorkflowDocument state=new CreateVirtualNetworkWorkflowDocument(); state.taskState=new CreateVirtualNetworkWorkflowDocument.TaskState(); state.ta...
This method creates a patch State object which is sufficient to patch a CreateVirtualNetworkTaskService instance.
public boolean isSetBeginTime(){ return EncodingUtils.testBit(issetBitfield,BEGINTIME_ISSET_ID); }
Returns true if field beginTime is set (has been assigned a value) and false otherwise
private void consolidateDuplicates(){ Map<String,List<ProtectionSet>> labelURIListMap=new HashMap<String,List<ProtectionSet>>(); List<URI> protectionSetURIs=dbClient.queryByType(ProtectionSet.class,true); log.info("Scanning ProtectionSets for duplicate names."); for ( URI protectionSetURI : protectionSetURIs) ...
searches for protection sets with duplicate names and consolidates into one protection set
public static void registerMetadata(MetadataRegistry registry){ if (registry.isRegistered(KEY)) { return; } ElementCreator builder=registry.build(KEY); builder.addAttribute(END_TIME); builder.addAttribute(START_TIME).setRequired(true); builder.addAttribute(VALUE_STRING); builder.addElement(Reminder.KE...
Registers the metadata for this element.
@Override public String generateLabelString(XYDataset dataset,int series,int item){ String result; Object[] items; if (dataset instanceof XYZDataset) { items=createItemArray((XYZDataset)dataset,series,item); } else { items=createItemArray(dataset,series,item); } result=MessageFormat.format(getForma...
Generates a label string for an item in the dataset.
public static int floor_int(final float a){ final int intpart=(int)a; if (a >= intpart || (CHECK_OVERFLOW && intpart == Integer.MIN_VALUE) || CHECK_NAN && Float.isNaN(a)) { return intpart; } return intpart - 1; }
Faster alternative to floor(float) optimized for the integer domain and supporting NaN and +/-Infinity.
public JSONException syntaxError(String message){ return new JSONException(message + this); }
Returns an exception containing the given message plus the current position and the entire input string.
public static double[] logs2probs(double[] a){ double max=a[maxIndex(a)]; double sum=0.0; double[] result=new double[a.length]; for (int i=0; i < a.length; i++) { result[i]=Math.exp(a[i] - max); sum+=result[i]; } normalize(result,sum); return result; }
Converts an array containing the natural logarithms of probabilities stored in a vector back into probabilities. The probabilities are assumed to sum to one.
@Override public boolean inSameL2Domain(DatapathId switch1,DatapathId switch2){ return inSameL2Domain(switch1,switch2,true); }
Checks if the two switches are in the same Layer 2 domain.
public static Week parseWeek(String s){ Week result=null; if (s != null) { s=s.trim(); int i=Week.findSeparator(s); if (i != -1) { String s1=s.substring(0,i).trim(); String s2=s.substring(i + 1,s.length()).trim(); Year y=Week.evaluateAsYear(s1); int w; if (y != null) { ...
Parses the string argument as a week. <P> This method is required to accept the format "YYYY-Wnn". It will also accept "Wnn-YYYY". Anything else, at the moment, is a bonus.
public static final void sort(int[] a,int[] b,int length){ mergesort(a,b,0,length - 1); }
Sort two arrays simultaneously, using the sort order of the values in the first array to determine the sort order for both arrays.
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:14.460 -0500",hash_original_method="E08EA131E9320463E856348907B813CB",hash_generated_method="664617F0F17BA9E1B53827ED2EDDA9E9") public void addMessageToConsole(String message,int lineNum...
Called by WebViewCore when we have a message to be added to the JavaScript error console. Sends a message to the Java side with the details.
static synchronized void reset(){ caches.clear(); }
For testing.
static boolean tagCloses(String tagName,String elementName){ return tagMatchesElementName(tagName,elementName) || (isHeading(tagName) && isHeading(elementName)); }
true if a close tag with the given name closes an element with the given name.
public static void readAbbrList(String dataFile,Map map) throws IOException { BufferedReader fin=new BufferedReader(new FileReader(dataFile)); String line; while ((line=fin.readLine()) != null) { StringTokenizer strTok=new StringTokenizer(line," \t\r\n"); if (strTok.countTokens() <= 0) { continue; ...
Read abbr list.
public NotificationChain basicSetDeclaredElementType(TypeRef newDeclaredElementType,NotificationChain msgs){ TypeRef oldDeclaredElementType=declaredElementType; declaredElementType=newDeclaredElementType; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET...
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean createAccounting(KeyNamePair currency,boolean hasProduct,boolean hasBPartner,boolean hasProject,boolean hasMCampaign,boolean hasSRegion,Timestamp startDate,int historyYears,File AccountingFile){ log.info(m_client.toString()); m_hasProject=hasProject; m_hasMCampaign=hasMCampaign; m_hasSRegion=hasS...
Create Accounting elements. - Calendar - Account Trees - Account Values - Accounting Schema - Default Accounts
boolean isValidScheme(String scheme){ return true; }
Verifies the scheme contains only valid characters as per the URN specification (see NID).
public void loadAIMLFile(InputStream stream,String name,boolean createStates,boolean mergeState,boolean indexStatic,String encoding,int maxSize){ String text=Utils.loadTextFile(stream,encoding,MAX_FILE_SIZE); loadAIML(text,name,createStates,mergeState,indexStatic); }
Load, parse, the aiml file as a state machine.
public int compareTo(Dog daUddaDog){ return this.size - daUddaDog.size; }
Compares, assuming obj is a Dog.
public boolean isSetNewlist(){ return this.newlist != null; }
Returns true if field newlist is set (has been assigned a value) and false otherwise
public CharSet minus(CharSet that){ CharSet result=this.copy(); for (int i=MathLib.min(this._mapping.length,that._mapping.length); --i >= 0; ) { result._mapping[i]&=~that._mapping[i]; } return result; }
Returns the character set containing the characters from this character minus the characters from the character set specified.
public Warning(int code,Object... args){ this(Messages.INSTANCE.getValidationWarning(code,args),code); }
Creates a new warning whose message text is defined in the resource bundle.
@Override public boolean equals(Object other){ if (other == null || this.getClass() != other.getClass()) { return false; } DOMNodeObjectModel otherDOMNodeObjectModel=(DOMNodeObjectModel)other; if (this.nodeType.equals(otherDOMNodeObjectModel.nodeType) && this.fields.equals(otherDOMNodeObjectModel.fields) &&...
A method to compare 2 DOMObjectNodeModel objects to verify if 2 DOM Nodes have the same content.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:20.554 -0500",hash_original_method="A1F941D6CE0FD78BF39EC8F9AC314942",hash_generated_method="C972BE9BCA555461E0B0F1907BED8AEB") protected void addMessageProcessor(MessageProcessor newMessageProcessor) throws IOException { synchroniz...
Adds a new MessageProcessor to the list of running processors for this SIPStack and starts it. You can use this method for dynamic stack configuration.
public void addAuthorization(Authorization authorization){ authorizations.put(authorization.getUsername(),authorization); }
Adds the given authorization to the user mapping.
private static void runAnalysis(){ SpatialAnalysis.writePopulationToShape("/home/dhosse/Dokumente/01_eGAP/plansV4.xml.gz","/home/dhosse/Dokumente/01_eGAP/popV4.shp"); }
An entry point for some analysis methods...
public boolean logModified(Logger log){ return false; }
Returns the modified
public static Element addElementFirst(final Element parent,final String name){ final Element ele=parent.getOwnerDocument().createElement(name); parent.insertBefore(ele,null); return ele; }
Create a new element and add it as the first child
@DSComment("Potential intent to trigger other processing") @DSSafe(DSCat.INTENT_EXCHANGE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:09.517 -0500",hash_original_method="79076492A33BAA4B69A022CE305E32E8",hash_generated_method="1A23CC6FCDD5B5BFDC1538D40AAC1BAC") public Intent ...
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".
private static char[] zzUnpackCMap(String packed){ char[] map=new char[0x10000]; int i=0; int j=0; while (i < 198) { int count=packed.charAt(i++); char value=packed.charAt(i++); do map[j++]=value; while (--count > 0); } return map; }
Unpacks the compressed character translation table.
@Override public String toString(){ return "[" + this.getClass().getCanonicalName() + " size="+ _values.length+ ","+ " values="+ Arrays.toString(_values)+ "]"; }
Returns a brief description of this container. The exact details of this representation are unspecified and are subject to change.
default String renderThrows(Generator gen,M model){ return gen.onEach(model.getExceptions()).collect(joinIfNotEmpty(", ","throws ","")); }
Render the throws-part of the model.
public Configurator loadingBackgroundResource(int backgroundRes){ if (backgroundRes > 0) { viewLoadingBackgroundResource=backgroundRes; } return this; }
Customize the loading view background.
protected boolean hasZoom(){ return true; }
Has Zoom
public StrSubstitutor(final StrLookup<?> variableResolver){ this(variableResolver,DEFAULT_PREFIX,DEFAULT_SUFFIX,DEFAULT_ESCAPE); }
Creates a new instance and initializes it.
public AccountAttribute asAccountAttribute(Account.Id id){ if (id == null) { return null; } return asAccountAttribute(accountCache.get(id).getAccount()); }
Create an AuthorAttribute for the given account suitable for serialization to JSON.
static void satisfy(boolean expression,String message){ if (!expression) { throw new IllegalArgumentException(message); } }
Assert a boolean expression, throwing IllegalArgumentException if the test result is false.
public void run(String username,String password) throws AuthenticationException { for ( String s : WELCOME_MESSAGE) { out.println(s); } BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); login(username,password); try { loadSheet(reader); } catch ( Exception e) { e.pri...
Starts up the demo and prompts for commands.
public boolean isFilled(){ return filled; }
Return filled. Since filled is boolean, its getter method is named isFilled
void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { TFileIndexEntry keyLast=new TFileIndexEntry(lastKeyBufferOS.getBuffer(),0,lastKeyBufferOS.size(),blkRecordCount); tfileIndex.addEn...
Close the current data block if necessary.
public void addKeyData(String key,int low,int high){ if (keys == null) { keys=new ArrayList<String>(); keys_min=new ArrayList<Integer>(); keys_range=new ArrayList<Integer>(); } keys.add(key); keys_min.add(low); keys_range.add(high - low + 1); }
Add a key data. By making a single call we ensure that all three Arrays are not corrupt and that the addition is atomic/one place
@Override synchronized void verifyCanLogMessage(){ super.verifyCanLogMessage(); }
This method is synchronized in the test class