Codota Logo
Household.getIncome
Code IndexAdd Codota to your IDE (free)

How to use
getIncome
method
in
org.matsim.households.Household

Best Java code snippets using org.matsim.households.Household.getIncome (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

@Override
public int compare(Household o1, Household o2) {
  if (o1.getIncome().getIncomePeriod() != o2.getIncome().getIncomePeriod()){
    throw new IllegalArgumentException("Can only compare Households with incomes in "
        + " same income period");
  }
  if (o1.getIncome().getIncome() < o2.getIncome().getIncome()){
    return -1;
  }
  else if (o1.getIncome().getIncome() > o2.getIncome().getIncome()){
    return 1;
  }
  return 0;
}
origin: matsim-org/matsim

/*package*/ void writeHousehold(Household h) throws UncheckedIOException {
  this.atts.clear();
  atts.add(createTuple(HouseholdsSchemaV10Names.ID, h.getId().toString()));
  this.writeStartTag(HouseholdsSchemaV10Names.HOUSEHOLD, atts);
  if ((h.getMemberIds() != null) && !h.getMemberIds().isEmpty()){
    this.writeMembers(h.getMemberIds());
  }
  if ((h.getVehicleIds() != null) && !h.getVehicleIds().isEmpty()) {
    this.writeStartTag(HouseholdsSchemaV10Names.VEHICLES, null);
    for (Id<Vehicle> id : h.getVehicleIds()){
      atts.clear();
      atts.add(createTuple(HouseholdsSchemaV10Names.REFID, id.toString()));
      this.writeStartTag(HouseholdsSchemaV10Names.VEHICLEDEFINITIONID, atts, true);
    }
    this.writeEndTag(HouseholdsSchemaV10Names.VEHICLES);
  }
  if (h.getIncome() != null){
    this.writeIncome(h.getIncome());
  }
  AttributesXmlWriterDelegate attributesWriter = new AttributesXmlWriterDelegate();
  attributesWriter.putAttributeConverters(this.attributeConverters);
  try {
    this.writer.write(NL);
  } catch (IOException e) {
    e.printStackTrace();
  }
  attributesWriter.writeAttributes( "\t\t" , this.writer , h.getAttributes() );
  this.writeEndTag(HouseholdsSchemaV10Names.HOUSEHOLD);
}
origin: matsim-org/matsim

assertEquals(vid42, vehIds.get(1));
assertNotNull(hh.getIncome());
assertNotNull(hh.getIncome().getIncomePeriod());
assertEquals(IncomePeriod.month, hh.getIncome().getIncomePeriod());
assertEquals("eur", hh.getIncome().getCurrency());
assertEquals(50000.0d, hh.getIncome().getIncome(), EPSILON);
assertEquals(vid23, hh.getVehicleIds().get(0));
assertNotNull(hh.getIncome());
assertNotNull(hh.getIncome().getIncomePeriod());
assertEquals(IncomePeriod.day, hh.getIncome().getIncomePeriod());
assertEquals("eur", hh.getIncome().getCurrency());
assertEquals(1000.0d, hh.getIncome().getIncome(), EPSILON);
assertEquals(0, hh.getVehicleIds().size());
assertNull(hh.getIncome());
org.matsim.householdsHouseholdgetIncome

Javadoc

This returns an Income, not a number. The Income type contains a method `getIncomePeriod()'.

Popular methods of Household

  • getId
  • getMemberIds
  • getVehicleIds
  • getAttributes
  • setIncome

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collectors (java.util.stream)
  • JFrame (javax.swing)
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