Codota Logo
Handler
Code IndexAdd Codota to your IDE (free)

How to use
Handler
in
de.westnordost.osmapi.common

Best Java code snippets using de.westnordost.osmapi.common.Handler (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: westnordost/StreetComplete

  @Override public void handle(ChangesetInfo tea)
  {
    if(earliest == null || earliest.dateCreated.after(tea.dateCreated))
    {
      earliest = tea;
      relayTo.handle(tea);
      foundMore = true;
    }
  }
}
origin: westnordost/StreetComplete

  @Override public void getAll(BoundingBox bounds, Handler<Note> handler, int limit,
                 int hideClosedNoteAfter)
  {
    // ignoring all the parameters except the handler...
    for(Note note : notes)
    {
      handler.handle(note);
    }
  }
}
origin: westnordost/StreetComplete

private void setUpThereIsANoteFor(CreateNote createNote, final Note note)
{
  when(mapDataDao.getWay(createNote.elementId)).thenReturn(mock(Way.class));
  doAnswer(invocation ->
  {
    Handler<Note> handler = (Handler<Note>) invocation.getArguments()[1];
    handler.handle(note);
    return null;
  }).when(notesDao).getAll(any(), any(), anyInt(), anyInt());
}
origin: westnordost/osmapi

  @Override
  protected void handleElement(T element)
  {
    handler.handle(element);
  }
}
origin: westnordost/osmapi

  @Override
  protected void onEndElement()
  {
    String name = getName();
    
    if(name.equals(GPX_FILE))
    {
      handler.handle(trace);
      trace = null;
    }
    else if(name.equals(DESCRIPTION))
    {
      trace.description = getText();
    }
    else if(name.equals(TAG))
    {
      if(trace.tags == null) trace.tags = new ArrayList<String>();
      trace.tags.add(getText());
    }
  }
}
origin: westnordost/osmapi

currentChangesetInfo.discussion = comments;
handler.handle(currentChangesetInfo);
currentChangesetInfo = null;
origin: westnordost/osmapi

  @Override
  protected void onEndElement()
  {
    String name = getName();
    String parent = getParentName();

    if(USER.equals(name))
    {
      handler.handle(userDetails);
      user = userDetails = null;
    }
    else if(LANGUAGES.equals(name))
    {
      userDetails.preferredLanguages = languages;
      languages = null;
    }
    if(LANGUAGES.equals(parent))
    {
      if("lang".equals(name))
      {
        assert languages != null;
        languages.add(getText());
      }
    }
  }
}
origin: westnordost/osmapi

  @Override
  protected void onEndElement() throws ParseException
  {
    String name = getName();
    
    if(TRACKPOINT.equals(name))
    {
      handler.handle(trackpoint);
      trackpoint = null;
    }
    else if(TRACKPOINT.equals(getParentName()))
    {
      if(name.equals("time"))
        trackpoint.time = dateFormat.parse(getText());
      if(name.equals("ele"))
        trackpoint.elevation = Float.valueOf(getText());
      if(name.equals("hdop"))
        trackpoint.horizontalDilutionOfPrecision = Float.valueOf(getText());
    }
  }
}
origin: westnordost/osmapi

@Override
protected void onStartElement()
{
  String name = getName();
  if (name.equals(NODE) || name.equals(WAY) || name.equals(RELATION))
  {
    DiffElement e = new DiffElement();
    e.type = Element.Type.valueOf(name.toUpperCase(Locale.UK));
    e.clientId = getLongAttribute("old_id");
    e.serverId = getLongAttribute("new_id");
    e.serverVersion = getIntAttribute("new_version");
    handler.handle(e);
  }
}
origin: westnordost/osmapi

handler.handle( user );
user = null;
origin: westnordost/osmapi

handler.handle( currentNote );
currentNote = null;
de.westnordost.osmapi.commonHandler

Most used methods

  • handle
    Called when a new object is created from the input stream

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now