Tabnine Logo
IdentifiableBase.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
org.apache.maven.settings.IdentifiableBase

Best Java code snippets using org.apache.maven.settings.IdentifiableBase.getId (Showing top 10 results out of 315)

origin: apache/maven

/**
 * @param identifiables
 * @return a map
 */
private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables )
{
  Map<String, T> byId = new HashMap<>();
  for ( T identifiable : identifiables )
  {
    byId.put( identifiable.getId(), identifiable );
  }
  return byId;
}
origin: apache/maven

/**
 * @param dominant
 * @param recessive
 * @param recessiveSourceLevel
 */
private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive,
                                  String recessiveSourceLevel )
{
  Map<String, T> dominantById = mapById( dominant );
  for ( T identifiable : recessive )
  {
    if ( !dominantById.containsKey( identifiable.getId() ) )
    {
      identifiable.setSourceLevel( recessiveSourceLevel );
      dominant.add( identifiable );
    }
  }
}
origin: apache/maven

/**
 * Method writeIdentifiableBase.
 * 
 * @param identifiableBase
 * @param serializer
 * @param tagName
 * @throws java.io.IOException
 */
private void writeIdentifiableBase( IdentifiableBase identifiableBase, String tagName, XmlSerializer serializer )
  throws java.io.IOException
{
  serializer.startTag( NAMESPACE, tagName );
  if ( ( identifiableBase.getId() != null ) && !identifiableBase.getId().equals( "default" ) )
  {
    serializer.startTag( NAMESPACE, "id" ).text( identifiableBase.getId() ).endTag( NAMESPACE, "id" );
  }
  serializer.endTag( NAMESPACE, tagName );
} //-- void writeIdentifiableBase( IdentifiableBase, String, XmlSerializer )
origin: org.apache.maven/maven-settings

/**
 * Method writeIdentifiableBase.
 * 
 * @param identifiableBase
 * @param serializer
 * @param tagName
 * @throws java.io.IOException
 */
private void writeIdentifiableBase( IdentifiableBase identifiableBase, String tagName, XmlSerializer serializer )
  throws java.io.IOException
{
  serializer.startTag( NAMESPACE, tagName );
  if ( ( identifiableBase.getId() != null ) && !identifiableBase.getId().equals( "default" ) )
  {
    serializer.startTag( NAMESPACE, "id" ).text( identifiableBase.getId() ).endTag( NAMESPACE, "id" );
  }
  serializer.endTag( NAMESPACE, tagName );
} //-- void writeIdentifiableBase( IdentifiableBase, String, XmlSerializer )
origin: io.tesla.maven/maven-settings-builder

/**
 * @param identifiables
 * @return a map
 */
private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables )
{
  Map<String, T> byId = new HashMap<String, T>();
  for ( T identifiable : identifiables )
  {
    byId.put( identifiable.getId(), identifiable );
  }
  return byId;
}
origin: org.apache.maven/maven-settings-builder

/**
 * @param identifiables
 * @return a map
 */
private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables )
{
  Map<String, T> byId = new HashMap<>();
  for ( T identifiable : identifiables )
  {
    byId.put( identifiable.getId(), identifiable );
  }
  return byId;
}
origin: io.tesla.maven/maven-settings-builder

/**
 * @param dominant
 * @param recessive
 * @param recessiveSourceLevel
 */
private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive,
                                  String recessiveSourceLevel )
{
  Map<String, T> dominantById = mapById( dominant );
  for ( T identifiable : recessive )
  {
    if ( !dominantById.containsKey( identifiable.getId() ) )
    {
      identifiable.setSourceLevel( recessiveSourceLevel );
      dominant.add( identifiable );
    }
  }
}
origin: org.apache.maven/maven-settings-builder

/**
 * @param dominant
 * @param recessive
 * @param recessiveSourceLevel
 */
private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive,
                                  String recessiveSourceLevel )
{
  Map<String, T> dominantById = mapById( dominant );
  for ( T identifiable : recessive )
  {
    if ( !dominantById.containsKey( identifiable.getId() ) )
    {
      identifiable.setSourceLevel( recessiveSourceLevel );
      dominant.add( identifiable );
    }
  }
}
origin: org.netbeans.api/org-netbeans-modules-maven-embedder

/**
 * Method updateIdentifiableBase.
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateIdentifiableBase(IdentifiableBase value, String xmlTag, Counter counter, Element element)
{
  boolean shouldExist = value != null;
  Element root = updateElement(counter, element, xmlTag, shouldExist);
  if (shouldExist) {
    Counter innerCount = new Counter(counter.getDepth() + 1);
    findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
  }
} //-- void updateIdentifiableBase(IdentifiableBase, String, Counter, Element) 
origin: org.codehaus.mevenide/nb-mvn-embedder

/**
 * Method updateIdentifiableBase
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateIdentifiableBase(IdentifiableBase value, String xmlTag, Counter counter, Element element)
{
  boolean shouldExist = value != null;
  Element root = updateElement(counter, element, xmlTag, shouldExist);
  if (shouldExist) {
    Counter innerCount = new Counter(counter.getDepth() + 1);
    findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
  }
} //-- void updateIdentifiableBase(IdentifiableBase, String, Counter, Element) 
org.apache.maven.settingsIdentifiableBasegetId

Javadoc

Get the id field.

Popular methods of IdentifiableBase

  • setSourceLevel
  • <init>
  • clone
    Method clone.
  • setId
    Set the id field.

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Top 12 Jupyter Notebook extensions
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