congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MayContainNull
Code IndexAdd Tabnine to your IDE (free)

How to use
MayContainNull
in
com.igormaznitsa.meta.annotation

Best Java code snippets using com.igormaznitsa.meta.annotation.MayContainNull (Showing top 18 results out of 315)

origin: raydac/netbeans-mmd-plugin

 boolean doPlatformMenuAction(@Nonnull PlatformMenuEvent event, @Nullable @MayContainNull Object ... args);
}
origin: raydac/mvn-golang

@Nullable
protected static File findExisting(@Nonnull @MayContainNull final File... files) {
 File result = null;
 for (final File f : files) {
  if (f != null && f.isFile()) {
   result = f;
   break;
  }
 }
 return result;
}
origin: raydac/netbeans-mmd-plugin

@Nullable
public abstract MindMap doImport(@Nonnull final MindMapPanel panel,
                 @Nonnull final DialogProvider dialogProvider,
                 @Nullable final Topic actionTopic,
                 @Nonnull @MayContainNull final Topic[] selectedTopics) throws Exception;
origin: raydac/netbeans-mmd-plugin

public Topic(@Nonnull final MindMap map, @Nullable final Topic parent, @Nonnull final String text, @Nonnull @MayContainNull final Extra<?>... extras) {
 this(map, text, extras);
 this.parent = parent;
 if (parent != null) {
  if (parent.getMap() != map) {
   throw new IllegalArgumentException("Parent must belong to the same mind map");
  }
  parent.children.add(this);
 }
}
origin: com.igormaznitsa/meta-utils

/**
 * Append elements to the end of an array
 *
 * @param <T> type of array elements
 * @param array target array
 * @param elements elements to be added to the end of the target array
 * @return new array where elements are placed in the end
 * @since 1.1.3
 */
@Nonnull
@MayContainNull
@Weight(Weight.Unit.NORMAL)
public static <T> T[] append(@MayContainNull @Nonnull final T[] array, @MayContainNull final T... elements) {
 @SuppressWarnings("unchecked")
 final T[] result = (T[]) Array.newInstance(array.getClass().getComponentType(), array.length + elements.length);
 System.arraycopy(array, 0, result, 0, array.length);
 int index = array.length;
 for (final T element : elements) {
  result[index++] = element;
 }
 return result;
}
origin: com.igormaznitsa/meta-utils

/**
 * Append element to the start of an array.
 *
 * @param <T> type of array elements
 * @param element element to be added into start of array, can be null
 * @param array target array
 * @return new array where the element on the first position
 * @since 1.1.3
 */
@Nonnull
@MayContainNull
@Weight(Weight.Unit.NORMAL)
public static <T> T[] append(@Nullable final T element, @MayContainNull @Nonnull final T[] array) {
 @SuppressWarnings("unchecked")
 final T[] result = (T[]) Array.newInstance(array.getClass().getComponentType(), array.length + 1);
 System.arraycopy(array, 0, result, 1, array.length);
 result[0] = element;
 return result;
}
origin: raydac/mvn-golang

/**
 * Make file path from provided strings
 * @param paths path elements
 * @return joined file path with OS file separator
 * @since 2.1.7
 */
@Nonnull
public static String makeOsFilePathWithoutDuplications(@Nonnull @MayContainNull final String... paths) {
 final StringBuilder result = new StringBuilder();
 final Set<String> alreadyAdded = new HashSet<>();
 for (final String s : paths) {
  if (s != null && !s.isEmpty() && !alreadyAdded.contains(s)) {
   alreadyAdded.add(s);
   if (result.length() > 0) {
    result.append(File.pathSeparatorChar);
   }
   result.append(s);
  }
 }
 return result.toString();
}
origin: raydac/mvn-golang

/**
 * Make file path appropriate for current OS.
 *
 * @param files files which will be added in the path
 * @return joined file path with OS file separator
 * @since 2.1.7
 */
@Nonnull
public static String makeOsFilePathWithoutDuplications(@Nonnull @MayContainNull final File[] files) {
 final StringBuilder result = new StringBuilder();
 final Set<File> alreadyAdded = new HashSet<>();
 for (final File f : files) {
  if (f == null || alreadyAdded.contains(f)) {
   continue;
  }
  alreadyAdded.add(f);
  if (result.length() > 0) {
   result.append(File.pathSeparatorChar);
  }
  result.append(f.getAbsolutePath());
 }
 return result.toString();
}
origin: raydac/netbeans-mmd-plugin

private Topic(@Nonnull final MindMap map, @Nonnull final String text, @Nonnull @MayContainNull final Extra<?>... extras) {
 this.map = Assertions.assertNotNull(map);
 this.text = Assertions.assertNotNull(text);
 for (final Extra<?> e : extras) {
  if (e != null) {
   this.extras.put(e.getType(), e);
  }
 }
}
origin: com.igormaznitsa/meta-utils

/**
 * Join arrays provided as parameters, all arrays must be the same type, null
 * values allowed.
 *
 * @param <T> type of array
 * @param arrays array of arrays to be joined
 * @return all joined arrays as single array
 * @since 1.0
 */
@Nonnull
@MayContainNull
@Weight(Weight.Unit.NORMAL)
public static <T> T[] joinArrays(@MayContainNull final T[]... arrays) {
 int commonLength = 0;
 for (final T[] array : arrays) {
  if (array != null) {
   commonLength += array.length;
  }
 }
 @SuppressWarnings("unchecked")
 final T[] result = (T[]) Array.newInstance(arrays.getClass().getComponentType().getComponentType(), commonLength);
 int position = 0;
 for (final T[] array : arrays) {
  if (array != null) {
   System.arraycopy(array, 0, result, position, array.length);
   position += array.length;
  }
 }
 return result;
}
origin: raydac/netbeans-mmd-plugin

private boolean processMenuEvent(@Nonnull final PlatformMenuEvent event, @Nullable @MayContainNull final Object... args) {
 final PlatformMenuAction action = this.actions.get(event);
 boolean handled = false;
 if (action == null) {
  LOGGER.info("No registered menu event handler : " + event);//NOI18N
 } else {
  handled = action.doPlatformMenuAction(event, args);
  LOGGER.info("Processed menu event : " + event); //NOI18N
 }
 return handled;
}
origin: raydac/netbeans-mmd-plugin

private boolean processMenuEvent(@Nonnull final PlatformMenuEvent event, @Nullable @MayContainNull final Object... args) {
 final PlatformMenuAction action = this.actions.get(event);
 boolean handled = false;
 if (action == null) {
  LOGGER.info("No registered menu event handler : " + event);//NOI18N
 } else {
  handled = action.doPlatformMenuAction(event, args);
  LOGGER.info("Processed menu event : " + event); //NOI18N
 }
 return handled;
}
origin: com.igormaznitsa/meta-utils

/**
 * Check that object is presented among provided elements and replace the object by equal element from the list.
 *
 * @param <T> type of object
 * @param obj object to be checked
 * @param list list of elements for checking
 * @return equal element provided in the list
 * @throws AssertionError if object is not found among defined ones
 * @since 1.0.2
 */
@Nullable
public static <T> T assertAmong(@Nullable T obj, @MayContainNull @Nonnull final T... list) {
 if (obj == null) {
  for (final T i : assertNotNull(list)) {
   if (i == null) {
    return i;
   }
  }
 } else {
  final int objHash = obj.hashCode();
  for (final T i : assertNotNull(list)) {
   if (obj == i || (i!=null && objHash == i.hashCode() && obj.equals(i))) {
    return i;
   }
  }
 }
 final AssertionError error = new AssertionError("Object is not found among elements");
 MetaErrorListeners.fireError("Asserion error", error);
 throw error;
}
origin: raydac/netbeans-mmd-plugin

 @Nonnull final DialogProvider dialogProvider,
 @Nullable final Topic actionTopic,
 @Nonnull @MayContainNull final Topic[] selectedTopics,
 @Nullable final CustomJob processor) {
final JMenuItem result = UI_COMPO_FACTORY.makeMenuItem(getName(panel, actionTopic, selectedTopics), getIcon(panel, actionTopic, selectedTopics));
origin: raydac/netbeans-mmd-plugin

 @Nonnull final DialogProvider dialogProvider,
 @Nullable final Topic actionTopic,
 @Nonnull @MayContainNull final Topic[] selectedTopics,
 @Nullable final CustomJob processor) {
final JMenuItem result = UI_COMPO_FACTORY.makeMenuItem(getName(panel, actionTopic, selectedTopics), getIcon(panel, actionTopic, selectedTopics));
origin: raydac/netbeans-mmd-plugin

@Nonnull final PopUpSection section,
final boolean fullScreenModeActive,
@Nonnull @MayContainNull final List<JMenuItem> list,
@Nonnull DialogProvider dialogProvider,
@Nullable final Topic topicUnderMouse,
origin: raydac/netbeans-mmd-plugin

@Override
public boolean doPlatformMenuAction(@Nonnull final PlatformMenuEvent event, @Nullable @MayContainNull final Object... args) {
 boolean handled = false;
 switch (event) {
  case ABOUT: {
   this.menuAboutActionPerformed(new ActionEvent(this, 0, "about")); //NOI18N
   handled = true;
  }
  break;
  case QUIT: {
   handled = doClosing();
   if (handled) {
    dispose();
   }
  }
  break;
  case REOPEN_APPLICATION: {
   this.setVisible(true);
   handled = true;
  }
  break;
  case PREFERENCES: {
   editPreferences();
   handled = true;
  }
  break;
 }
 return handled;
}
origin: raydac/netbeans-mmd-plugin

public void removeExtras(@Nullable @MayContainNull final Extra<?>... extras) {
 this.map.lock();
 try {
  if (extras == null || extras.length == 0) {
   this.extras.clear();
  } else {
   for (final Extra<?> e : extras) {
    if (e != null) {
     this.extras.remove(e.getType());
    }
   }
  }
 }
 finally {
  this.map.unlock();
 }
}
com.igormaznitsa.meta.annotationMayContainNull

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Menu (java.awt)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now