code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public cudaFuncAttributes(){
}
| Creates new, uninitialized cudaFuncAttributes |
protected void dispatchBindingChangedEvent(Element bindableElement,Element shadowTree){
Object[] ls=bindingListenerList.getListenerList();
for (int i=ls.length - 2; i >= 0; i-=2) {
BindingListener l=(BindingListener)ls[i + 1];
l.bindingChanged(bindableElement,shadowTree);
}
}
| Dispatches a BindingEvent the registered listeners. |
protected Element invokeWriteToXML(Element parent,Object o,String name) throws Exception {
Method method;
Class<?>[] methodClasses;
Object[] methodArgs;
boolean array;
Element node;
boolean useDefault;
node=null;
method=null;
useDefault=false;
m_CurrentNode=parent;
if (o == null) {
useDefault=... | either invokes a custom method to write a specific property/class or the standard method <code>writeToXML(Element,Object,String)</code> |
public void insert(final AbstractInsnNode location,final AbstractInsnNode insn){
++size;
AbstractInsnNode next=location.next;
if (next == null) {
last=insn;
}
else {
next.prev=insn;
}
location.next=insn;
insn.next=next;
insn.prev=location;
cache=null;
insn.index=0;
}
| Inserts the given instruction after the specified instruction. |
public InlineQueryResultGif.InlineQueryResultGifBuilder id(String id){
this.id=id;
return this;
}
| *Optional Sets the ID to the provided value. If none is set a random 32 char long ID will be generated. |
protected AbstractSet(){
}
| Constructs a new instance of this AbstractSet. |
public Workflow.Method rollbackMethodNullMethod(){
return new Workflow.Method(ROLLBACK_METHOD_NULL);
}
| Creates a rollback workflow method that does nothing, but allows rollback to continue to prior steps back up the workflow chain. |
public static boolean isRuntimeStubMethod(SootMethod method){
if (stubExceptionMethod == null) {
String signature="<java.lang.RuntimeException: void <init>(java.lang.String)>";
stubExceptionMethod=Scene.v().getMethod(signature);
}
if (!method.hasActiveBody()) return true;
for ( Tag t : method.getTags... | check if a given method is a runtime stub |
public static CreateStatement orReplace(CharSequence table){
return produce(table,"REPLACE");
}
| Producing an "INSERT OR REPLACE INTO ..."(equivalent to "REPLACE INTO ...") statement. <p/> When an UNIQUE or PRIMARY KEY constraint violation occurs, the REPLACE algorithm silently deletes pre-existing rows that are causing the constraint violation prior to inserting the current row. <p/> Checking the <a href="http://... |
public void initialize(int lteSignalStrength,int rsrp,int rsrq,int rssnr,int cqi,int timingAdvance){
mSignalStrength=lteSignalStrength;
mRsrp=rsrp;
mRsrq=rsrq;
mRssnr=rssnr;
mCqi=cqi;
mTimingAdvance=timingAdvance;
}
| Initialize all the values |
public ColumnSpec(Size size){
super(DEFAULT,size,NO_GROW);
}
| Constructs a ColumnSpec for the given size using the default alignment, and no resizing. |
public static String toString(final Object obj){
return (obj == null ? null : obj.toString());
}
| Null-safe implementation of the Object.toString method. </p> |
protected void updateSelectedDriver(){
signalHeadPanel.setVisible(false);
turnoutMastScroll.setVisible(false);
disabledAspectsScroll.setVisible(false);
dccMastScroll.setVisible(false);
matrixMastBitnumPanel.setVisible(false);
matrixMastScroll.setVisible(false);
if (Bundle.getMessage("TurnCtlMast").equals(... | Update contents of Add/Edit mast panel appropriate for chosen Driver type hide the other JPanels invoked when selecting a Signal Mast Driver |
@Override public boolean isShifted(){
if (mShiftKeys[0] != null) {
return mShiftState != SHIFT_OFF;
}
else {
return super.isShifted();
}
}
| Whether or not keyboard is shifted. |
private static String toJson(Entity entity) throws EntityException {
try {
TSerializer serializer=new TSerializer(new TJSONProtocol.Factory());
switch (entity.getType()) {
case DATABASE:
Database db=entity.getDatabase();
return serializer.toString(db);
case TABLE:
Table tableWithLocation=new Table(ent... | Converts the object that the entity represents into a JSON string |
public void deleteTrigger(BigInteger alertId,BigInteger triggerId) throws IOException {
String requestUrl=RESOURCE + "/" + alertId.toString()+ "/triggers/"+ triggerId.toString();
ArgusResponse response=getClient().executeHttpRequest(ArgusHttpClient.RequestType.DELETE,requestUrl,null);
assertValidResponse(response... | Deletes a trigger having the given ID and removes any associations with the alert or notifications. |
public static boolean isCurrentUser(final String userId){
final String currentUserId=AppConstants.UserInfo.INSTANCE.getId();
return !TextUtils.isEmpty(currentUserId) && currentUserId.equals(userId);
}
| Checks whether the given user id is the current user or not |
@Deprecated public static String openUrl(String url,String method,Bundle params) throws MalformedURLException, IOException {
String strBoundary="3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f";
String endLine="\r\n";
OutputStream os;
if (method.equals("GET")) {
url=url + "?" + encodeUrl(params);
}
Utility.log... | Connect to an HTTP URL and return the response as a string. Note that the HTTP method override is used on non-GET requests. (i.e. requests are made as "POST" with method specified in the body). |
public Road(int id,String name,Intersection from,Intersection to,RoadClass roadClass,RoadLayer roadLayer){
this.id=id;
this.name=name;
this.roadLayer=roadLayer;
points=new Waypoint[2];
setIntersections(from,to);
this.roadClass=roadClass;
createLines();
modified=false;
}
| Create a road between two Intersections. The detailed segments between the intersections may be filled in later. |
public String product(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){
if (isCalloutActive() || value == null) return "";
int S_ResourceAssignment_ID=((Integer)value).intValue();
if (S_ResourceAssignment_ID == 0) return "";
int M_Product_ID=0;
String Name=null;
String Description... | Assignment_Product. - called from S_ResourceAssignment_ID - sets M_Product_ID, Description - Qty.. |
public Builder diskCacheExtraOptions(int maxImageWidthForDiskCache,int maxImageHeightForDiskCache,BitmapProcessor processorForDiskCache){
this.maxImageWidthForDiskCache=maxImageWidthForDiskCache;
this.maxImageHeightForDiskCache=maxImageHeightForDiskCache;
this.processorForDiskCache=processorForDiskCache;
return... | Sets options for resizing/compressing of downloaded images before saving to disk cache.<br /> <b>NOTE: Use this option only when you have appropriate needs. It can make ImageLoader slower.</b> |
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){
switch (featureID) {
case UmplePackage.ANONYMOUS_PARAMETER_LIST_1__PARAMETER_1:
return ((InternalEList<?>)getParameter_1()).basicRemove(otherEnd,msgs);
}
return super.eInverseRemove(otherEnd,featureID,m... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public CommandButtonGroup(@JdkConstants.BoxLayoutAxis int axis){
myAxis=axis;
setLayout(new BoxLayout(this,axis));
if (axis == BoxLayout.X_AXIS) {
add(Box.createHorizontalGlue());
}
else {
}
}
| Creates new <code>CommandButtonGroup</code> panel with specified orientation. |
public static List<String> readLines(File file,String encoding) throws IOException {
return readLines(file,Charsets.toCharset(encoding));
}
| Reads the contents of a file line by line to a List of Strings. The file is always closed. |
public boolean isBoundsInGrid(){
return boundsInGrid;
}
| Returns if the absolute <code>pos</code> value should be corrections to the component that is in a normal cell. If <code>false</code> the value of <code>pos</code> is truly absolute in that it will not affect the grid or have a default bounds in the grid. <p> For a more thorough explanation of what this constraint does... |
public void testRangeFacetInfiniteLoopDetection(){
for ( String field : new String[]{"foo_f","foo_d","foo_i"}) {
assertQEx("no zero gap error: " + field,req("q","*:*","facet","true","facet.range",field,"facet.range.start","23","facet.range.gap","0","facet.range.end","100"),400);
}
String field="foo_dt";
as... | kind of an absurd test because if there is an infinite loop, it would never finish -- but at least it ensures that <i>if</i> one of these requests return, they return an error |
void checkClosed(){
if (result == null) {
throw DbException.get(ErrorCode.OBJECT_CLOSED);
}
if (stat != null) {
stat.checkClosed();
}
if (conn != null) {
conn.checkClosed();
}
}
| Check if this result set is closed. |
private SavedState(Parcel in){
super(in);
prevFirstVisiblePosition=in.readInt();
prevFirstVisibleChildHeight=in.readInt();
prevScrolledChildrenHeight=in.readInt();
prevScrollY=in.readInt();
scrollY=in.readInt();
childrenHeights=new SparseIntArray();
final int numOfChildren=in.readInt();
if (0 < numOfC... | Called by CREATOR. |
private List<String> findMXRecordsRaw(String hostname) throws TemporaryResolutionException {
Record answers[]=lookup(hostname,Type.MX,"MX");
List<String> servers=new ArrayList<String>();
if (answers == null) {
return servers;
}
MXRecord[] mxAnswers=new MXRecord[answers.length];
for (int i=0; i < answers... | Return a prioritized unmodifiable list of MX records obtained from the server. |
public void translateEventInScreenToAppWindow(MotionEvent event){
event.scale(applicationInvertedScale);
}
| Translate the motion event captured on screen to the application's window. |
public LikeExpression(boolean isNot){
this.not=isNot;
}
| Ctor - for use to create an expression tree, without child expression. <p> Use add methods to add child expressions to acts upon. |
private void finish(){
updatePreviousNode();
for ( final IVisualCoverageListener listener : new ArrayList<IVisualCoverageListener>(listeners)) {
listener.finishedCoverage();
}
}
| Notifies all attached listeners that the Visual Trace is complete. |
@Deprecated public final IOContainer run(final IOContainer input,final int logVerbosity,final boolean cleanUp,final Map<String,String> macroMap) throws OperatorException {
return run(input,logVerbosity,macroMap);
}
| Starts the process with the given input. The process uses the given log verbosity. The boolean flag indicates if some static initializations should be cleaned before the process is started. This should usually be true but it might be useful to set this to false if, for example, several process runs uses the same object... |
public DynamicTreeNode(Object o){
super(o);
}
| Constructs a new DynamicTreeNode instance with o as the user object. |
@Override public void onCheckedChanged(CompoundButton switchView,boolean isChecked){
if (!isResumed()) {
return;
}
if (isChecked) {
if (mCapabilities != null && mCapabilities.getFilesSharingPublicPasswordEnforced().isTrue()) {
((FileActivity)getActivity()).getFileOperationsHelper().requestPasswordFo... | Called by R.id.shareViaLinkSectionSwitch to create or delete a public link. |
boolean canBeWalkedInNaturalDocOrderStatic(){
if (null != m_firstWalker) {
AxesWalker walker=m_firstWalker;
int prevAxis=-1;
boolean prevIsSimpleDownAxis=true;
for (int i=0; null != walker; i++) {
int axis=walker.getAxis();
if (walker.isDocOrdered()) {
boolean isSimpleDownAxis=((ax... | Tell if the nodeset can be walked in doc order, via static analysis. |
public boolean equals(Object o){
if (o == null) {
return false;
}
if (o instanceof FreeCellNode) {
return equivalent((FreeCellNode)o);
}
return false;
}
| Determine equals via equivalence of state. |
public boolean isElement(){
return false;
}
| This is used to determine if this node is an element. This node instance can not be an element so this method returns false. Returning null tells the users of this node that any attributes added to the node map will be permenantly lost. |
private static Map<String,String> resourceBundleMap(ResourceBundle bundle){
final HashMap<String,String> map=new HashMap<String,String>();
final Enumeration<String> e=bundle.getKeys();
while (e.hasMoreElements()) {
final String key=e.nextElement();
map.put(key,(String)bundle.getObject(key));
}
return ... | Returns an unmodifiable Map of the given bundle. |
public void sendDeliveredNotification(String to,String packetID){
Message msg=new Message(to);
MessageEvent messageEvent=new MessageEvent();
messageEvent.setDelivered(true);
messageEvent.setPacketID(packetID);
msg.addExtension(messageEvent);
con.sendPacket(msg);
}
| Sends the notification that the message was delivered to the sender of the original message |
public static NgnAVSession createOutgoingSession(NgnSipStack sipStack,NgnMediaType mediaType){
synchronized (sSessions) {
final NgnAVSession avSession=new NgnAVSession(sipStack,null,mediaType,InviteState.INPROGRESS);
sSessions.put(avSession.getId(),avSession);
return avSession;
}
}
| Creates an outgoing audio/video call session. |
public boolean isExternal(){
EList<N4Modifier> _declaredModifiers=this.getDeclaredModifiers();
return _declaredModifiers.contains(N4Modifier.EXTERNAL);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static void dumpAllocatedMemories(){
dumpAllocatedMemories(System.out);
}
| Dumps the allocated memories to console (standard output). |
public void detach(@NotNull Component childComponent) throws MismatchDetachException {
if (childComponent.parentComponent != this) {
String msg=String.format("The child component(%s) doesn't belong to component(%s)",childComponent.name == null ? "unnamed" : childComponent.getComponentId(),getComponentId());
t... | Detach the child component from this component. Once a component is detached the component tree won't use this component to locate suitable injection candidates and all its cached instances will be removed |
public static void picture(double x,double y,String s,double w,double h,double degrees){
Image image=getImage(s);
double xs=scaleX(x);
double ys=scaleY(y);
double ws=factorX(w);
double hs=factorY(h);
if (ws < 0 || hs < 0) throw new IllegalArgumentException("image " + s + " is corrupt");
if (ws <= 1 && h... | Draw picture (gif, jpg, or png) centered on (x, y), rotated given number of degrees, rescaled to w-by-h. |
public StaticNameCoder(final Map<String,String> java2Node,final Map<String,String> java2Attribute){
this.java2Node=new HashMap<>(java2Node);
if (java2Node == java2Attribute || java2Attribute == null) {
this.java2Attribute=this.java2Node;
}
else {
this.java2Attribute=new HashMap<>(java2Attribute);
}
r... | Construct a StaticNameCoder. |
public static boolean isNotEmpty(Object object){
return x.len(object) != 0;
}
| Checks if the input object is empty (does not contains any element). |
protected Size2D arrangeNR(BlockContainer container,Graphics2D g2,RectangleConstraint constraint){
RectangleConstraint c1=constraint.toUnconstrainedHeight();
Size2D size1=arrange(container,g2,c1);
if (constraint.getHeightRange().contains(size1.getHeight())) {
return size1;
}
else {
double h=constraint.... | Arrange with a fixed height and no width constraint. |
public com.lynden.gmapsfx.shapes.Polyline convert(){
return line;
}
| Returns the GMapsFX model Polyline |
CSSBgPainter(Component parent){
this.parent=parent;
}
| Construct a background painter for the given component |
public void onEndDrag(){
}
| Called when the drag event is ended. |
public noscript addElement(String element){
addElementToRegistry(element);
return (this);
}
| Adds an Element to the element. |
public XmlAttribute(String type,String value){
type_=type;
value_=value;
}
| Creates an XmlAttribute. |
public final int hashCode(){
final int PRIME=37;
final int SEED=5;
int result=SEED;
result+=result * PRIME + Double.doubleToLongBits(getLatitude());
result+=result * PRIME + Double.doubleToLongBits(getLongitude());
result+=result * PRIME + Double.doubleToLongBits(getAltitude());
result+=result * PRIME + D... | taken from http://stackoverflow.com/questions/113511/hash-code-implementation |
public void trimToSize(){
if (_data.length > size()) {
long[] tmp=new long[size()];
toNativeArray(tmp,0,tmp.length);
_data=tmp;
}
}
| Sheds any excess capacity above and beyond the current size of the list. |
@CanIgnoreReturnValue public final double addAndGet(double delta){
while (true) {
long current=value;
double currentVal=longBitsToDouble(current);
double nextVal=currentVal + delta;
long next=doubleToRawLongBits(nextVal);
if (updater.compareAndSet(this,current,next)) {
return nextVal;
}
... | Atomically adds the given value to the current value. |
@Override public void incomingObject(IAnalyzedInterval analyzedInterval) throws AdeException, AdeFlowException {
if (analyzedInterval.getInterval().getSource().getSourceId().equals(m_source)) {
throw new AdeFlowException("Cannot process analyzed interval of source other than " + m_source.getSourceId() + ". Got an... | Override superclass to use the new JAXB classes. |
protected WMouseDragGestureRecognizer(DragSource ds,Component c){
this(ds,c,DnDConstants.ACTION_NONE);
}
| construct a new WMouseDragGestureRecognizer |
public void addListener(final IMemoryListener listener){
m_listeners.add(listener);
}
| Adds an object that is notified about changes in the simulated memory. |
public static String readFileToString(Context ctx,String path) throws IOException {
StringBuilder sb=new StringBuilder();
char[] buffer=new char[INPUT_BUFFER_SIZE];
InputStream is=null;
try {
is=ctx.getAssets().open(path);
InputStreamReader reader=new InputStreamReader(is);
int numRead=reader.read(b... | reads a file in the assets into a string |
public static boolean isHovis(){
return sBuildModel.startsWith("hovis_box_");
}
| Whether the stack is running on a Hovis box |
public static String hashSHA(String str){
byte[] b=str.getBytes();
MessageDigest md=null;
try {
md=MessageDigest.getInstance("SHA1");
md.update(b);
}
catch ( NoSuchAlgorithmException e) {
e.printStackTrace();
}
return toHexString(md.digest());
}
| Returns the SHA hash of a String. |
private void sincronizarBase(){
listaSetor=ControleDAO.getBanco().getSetorDAO().listar();
}
| Sincronizar dados com banco de dados |
public static <T>T[] toArray(Collection<? extends T> list,Class<T> componentType){
if (list == null) {
return null;
}
return list.toArray(create(componentType,list.size()));
}
| Create an array from the given list, with the given cpType as the run-time component type. If the list is null, null is returned. |
private static final ImmutableMap<String,LaunchPhase> initEnumMapping(){
ImmutableMap.Builder<String,LaunchPhase> builder=new ImmutableMap.Builder<>();
for ( Entry<String,LaunchPhase> entry : getTypesafeEnumMapping(LaunchPhase.class).entrySet()) {
builder.put(UPPER_UNDERSCORE.to(LOWER_CAMEL,entry.getKey()),ent... | Returns a map of the static final fields to their values, case-converted. |
public void translate(double dx,double dy){
for ( MapNode n : nodes) {
n.getLocation().translate(dx,dy);
}
minBound.translate(dx,dy);
maxBound.translate(dx,dy);
offset.translate(dx,dy);
needsRehash=true;
}
| Translate whole map by dx and dy |
public DataTableITCase(String name){
super(name);
}
| Construct a new instance of this test case. |
public PrinterStateReasons(int initialCapacity){
super(initialCapacity);
}
| super a new, empty printer state reasons attribute; the underlying hash map has the given initial capacity and the default load factor. |
@Override public void onDownloadProgress(DownloadProgressInfo progress){
mAverageSpeed.setText(getString(R.string.kilobytes_per_second,Helpers.getSpeedString(progress.mCurrentSpeed)));
mTimeRemaining.setText(getString(R.string.time_remaining,Helpers.getTimeRemaining(progress.mTimeRemaining)));
progress.mOverallTo... | Sets the state of the various controls based on the progressinfo object sent from the downloader service. |
private static void startLogSystem(){
prepareLoggingSystemEnviroment();
logger.debug("XXXXXXX");
logger.info("-Setting base at :" + STENDHAL_FOLDER);
Log4J.init("data/conf/log4j.properties");
logger.debug("XXXXXXX");
logger.info("Setting base at :" + STENDHAL_FOLDER);
logger.info("Stendhal " + VERSION);
... | Starts the LogSystem. |
public Element store(Object o){
LayoutSlip p=(LayoutSlip)o;
Element element=new Element("layoutSlip");
element.setAttribute("ident",p.getName());
element.setAttribute("slipType","" + p.getSlipType());
if (p.getBlockName().length() > 0) {
element.setAttribute("blockname",p.getBlockName());
}
if (p.getC... | Default implementation for storing the contents of a LayoutSlip |
private static Matrix buildMatrix(int dataShards,int totalShards){
Matrix vandermonde=vandermonde(totalShards,dataShards);
Matrix top=vandermonde.submatrix(0,0,dataShards,dataShards);
return vandermonde.times(top.invert());
}
| Create the matrix to use for encoding, given the number of data shards and the number of total shards. The top square of the matrix is guaranteed to be an identity matrix, which means that the data shards are unchanged after encoding. |
public CLQueue createDefaultOutOfOrderQueue(){
return new CLDevice(platform,deviceIds.getSizeT()).createOutOfOrderQueue(this);
}
| Create an out-of-order OpenCL queue on the first device of this context.<br> Equivalent to calling <code>getDevices()[0].createOutOfOrderQueue(context)</code> |
private boolean zzRefill() throws java.io.IOException {
if (zzStartRead > 0) {
System.arraycopy(zzBuffer,zzStartRead,zzBuffer,0,zzEndRead - zzStartRead);
zzEndRead-=zzStartRead;
zzCurrentPos-=zzStartRead;
zzMarkedPos-=zzStartRead;
zzStartRead=0;
}
if (zzCurrentPos >= zzBuffer.length) {
cha... | Refills the input buffer. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
private String readUTFBody(long utfLen) throws IOException {
StringBuilder sbuf=new StringBuilder();
end=pos=0;
while (utfLen > 0) {
int avail=end - pos;
if (avail >= 3 || (long)avail == utfLen) utfLen-=readUTFSpan(sbuf,utfLen);
else {
if (avail > 0) GridUnsafe.copyMemory(utfBuf,BYTE_ARR_... | Reads in the "body" (i.e., the UTF representation minus the 2-byte or 8-byte length header) of a UTF encoding, which occupies the next utfLen bytes. |
public boolean empty(){
return vstack.empty();
}
| Indicate whether the stack is empty. |
@Override public void flush(){
}
| Flushing this writer has no effect. |
public String encode(ByteBuffer aBuffer){
byte[] buf=getBytes(aBuffer);
return encode(buf);
}
| A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. <P> The ByteBuffer's position will be advanced to ByteBuffer's limit. |
public void addVersionHistory(VersionHistory history){
Preconditions.checkNotNull(history);
boolean exists=false;
for ( VersionHistory vh : getVersionHistory()) {
if (vh.getVersion().equals(history.getVersion())) {
exists=true;
}
}
if (!exists) {
log.debug("Adding new version history: " + h... | Add new VersionHistory, as long as a VersionHistory with same version hasn't been added yet. The new version gets added at the top of the list. |
static int readInt(final byte[] b,final int index){
return ((b[index] & 0xFF) << 24) | ((b[index + 1] & 0xFF) << 16) | ((b[index + 2] & 0xFF) << 8)| (b[index + 3] & 0xFF);
}
| Reads a signed int value in the given byte array. |
public CacheObject load(Object key){
if (key != null) {
String xAndY=key.toString();
int commaIndex=xAndY.indexOf(',');
int x=Integer.parseInt(xAndY.substring(0,commaIndex));
int y=Integer.parseInt(xAndY.substring(commaIndex + 1));
if (Debug.debugging("asrpdetail")) {
Debug.output("Getting t... | Load a block image into the cache, based on the relative coordinates of the block as a key. |
public final void push(Node value){
int ff=m_firstFree;
if ((ff + 1) >= m_mapSize) {
if (null == m_map) {
m_map=new Node[m_blocksize];
m_mapSize=m_blocksize;
}
else {
m_mapSize+=m_blocksize;
Node newMap[]=new Node[m_mapSize];
System.arraycopy(m_map,0,newMap,0,ff + 1);
m_... | Append a Node onto the vector. |
public boolean isColorMaskBlueEnabled(){
return mColorMaskB;
}
| Queries whether blue channel is written |
public Adapter createEObjectAdapter(){
return null;
}
| Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!-- end-user-doc --> |
public GroupCategorySet(GroupCategory category){
Assert.isNotNull(category);
fContent=new ArrayList(1);
fContent.add(category);
}
| Creates a new list of group categories initialized with the given group category. |
@SuppressWarnings("unchecked") public static <K extends Comparable<? super K>,V>ImmutableSortedMap<K,V> of(K k1,V v1,K k2,V v2,K k3,V v3,K k4,V v4){
return ofEntries(entryOf(k1,v1),entryOf(k2,v2),entryOf(k3,v3),entryOf(k4,v4));
}
| Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys. |
public void visitEnd(){
if (fv != null) {
fv.visitEnd();
}
}
| Visits the end of the field. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the field have been visited. |
public SendableStickerMessage.SendableStickerMessageBuilder replyTo(Message replyTo){
this.replyTo=replyTo != null ? replyTo.getMessageId() : 0;
return this;
}
| *Optional Sets the Message object that you want to reply to |
public FBNBackupManager(String gdsType){
super(gdsType);
}
| Create a new instance of <code>FBNBackupManager</code> based on a given GDSType. |
public CloseableIteratorIteration(Iterator<? extends E> iter){
setIterator(iter);
}
| Creates a CloseableIteratorIteration that wraps the supplied iterator. |
static boolean isValid(String name){
return JMXSupport.isValid(name);
}
| We simply assume a pool is valid if it is in the list of pool names we maintain. |
public boolean reuseAddress(){
return reader.getBoolean(REUSE_ADDRESS,DEFAULT_REUSE_ADDRESS);
}
| The SO_REUSEADDR option. |
protected DeterministicKeyChain(DeterministicKey watchKey,boolean isFollowing){
this(watchKey);
this.isFollowing=isFollowing;
}
| <p>Creates a deterministic key chain with the given watch key. If <code>isFollowing</code> flag is set then this keychain follows some other keychain. In a married wallet following keychain represents "spouse's" keychain.</p> <p>Watch key has to be an account key.</p> |
private void sortChildDrawingOrder(){
if (drawingOrderedChildren == null) {
drawingOrderedChildren=new ArrayList<>();
}
else {
drawingOrderedChildren.clear();
}
final int childCount=getChildCount();
for (int i=0; i < childCount; i++) {
final View child=getChildAt(i);
drawingOrderedChildren.ad... | Sorts children in reverse order for drawing. |
public boolean isModifiedNow(){
return isModified();
}
| Returns true if the underlying dependencies have changed, forcing a check. |
@Override public int pushMessageSync(Message msg) throws org.apache.thrift.TException {
if (msg == null) {
log.error("Could not push empty message");
return 0;
}
List<String> sessionids=msg.getSessionIDs();
for ( String sid : sessionids) {
SessionQueue pQueue=null;
if (!msgQueues.containsKey(si... | The implementation for pushMessageSync() function. |
private static void restoreSolr5Index(Properties properties) throws IOException, SolrServerException {
String solrHome=properties.getProperty("dhus.solr.home");
String coreName=properties.getProperty("dhus.solr.core.name");
final String name=properties.getProperty("dhus.solr.backup.name");
final String location... | Performs Solr restoration. |
private boolean isGroupOnWhiteList(String groupId){
Pattern[] patterns=_groupWhiteList.getCompiledPatterns();
if (patterns != null && patterns.length > 0) {
for ( Pattern pattern : patterns) {
if (pattern.matcher(groupId).matches()) {
return true;
}
}
}
else {
return true;
}
... | Check if a group is on the whitelist for this authN provider |
public static boolean hasEntryLowerThan(List<Integer> list,Integer border){
for ( Integer pos : list) if (pos < border) return true;
return false;
}
| <p> hasEntryLowerThan </p> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.