Tabnine Logo
Household.getAttributes
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: matsim-org/matsim

currAttributes = this.currentHousehold.getAttributes();
attributesReader.startTag( name , atts , context, currAttributes );
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(50000.0d, hh.getIncome().getIncome(), EPSILON);
Attributes currentAttributes = hh.getAttributes();
assertNotNull("Custom attributes from household with id 23 should not be empty.", currentAttributes);
String customAttributeName = "customAttribute1";
org.matsim.householdsHouseholdgetAttributes

Popular methods of Household

  • getId
  • getMemberIds
  • getVehicleIds
  • getIncome
    This returns an Income, not a number. The Income type contains a method `getIncomePeriod()'.
  • setIncome

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • From CI to AI: The AI layer in your organization
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