All Questions
Tagged with multi-level java
20 questions
-1
votes
1
answer
63
views
type casting not working on inherited class
I have the following classes:
Shape
Rectangle
Square
Shape is the parent class , Rectangle extends Shape and Square extends Rectangle. I use
StringBuilder and the following code:
for (int i = 0; i <...
0
votes
2
answers
182
views
Inherited method in multilevel hierarchy in Java
Consider the multilevel inheritance hierarchy in Java:
public class First {public String name() { return "First"; }}
public class Second extends First {
public void m1() {
...
1
vote
2
answers
134
views
Adding Toast to Every ChildItem of a Multi Level Expandable LisView
I found this multilevel expandable listview which is very accurate with my project, but I also want to add a different toast to every third level (which is the last layer of view) child items. I tried ...
0
votes
1
answer
827
views
Multi level map to Json structure in java
I am trying to convert the multi level map into Json where level of the map can be any. For example
I have map like
Map m = new LinkedHashMap();
m.put("data.test[1].tool",6);
m....
4
votes
1
answer
193
views
Do multi level grouping and summing using Java Stream API
I have a class
public class Person {
private String name;
private String country;
private String city;
private String pet;
private int totalCountryToCityCount;
private int ...
0
votes
0
answers
149
views
How to create multi-level sliding menu?
i want to create a multi-level sliding menu with some items in android with java.
In this scenario, each level is a column and first column always shown, when user slide menu in right direction ...
2
votes
2
answers
3k
views
How to create multi level JSON data using JSONObject in servlet
I need to create JSON data like below,
{
"min": {
"week": "1",
"year": "2014"
},
"max": {
"week": "14",
"year": "2017"
}
}
But JSONObject accepts only "id","value" format.
So ...
0
votes
1
answer
261
views
Replacing files in multilevel zip folders
My requirement is to replace few files in a zip file.
The zip file in turn have multiple zip files and folder within it. It goes upto 4 or more levels of zip files.
I have a set of files in a ...
6
votes
3
answers
14k
views
Best Practices for Using Multi Level HashMap in Java
We have a situation where we are ending up using multi-level hash maps; that is, a hash map inside of a hash map, three or four levels deep.
Instinctively this felt wrong somewhere. I have read posts ...
2
votes
1
answer
353
views
Iterate multilevel collection in jsp
I found difficulties in iterating a multilevel collection on jsp.
@Entity
@Table(name = "Establishment")
public class Establishment extends Basis<Long> {
@Column(name = "code")
private Long ...
4
votes
1
answer
2k
views
Multi-level prioritized cache
We have the following requirements to a cache (java).
Cache-entries have different priority regarding eviction - the following properties of an entry will be a factor in this priority
When it was ...
1
vote
5
answers
103
views
Multilevel Inheritace "is-a" relationship?
In Java, if I:
Create a class A,
Create a class B which extends class A (this means B "is an" A),
Then create a class C which extends class B (this means C "is a" B).
Does this also mean that class C ...
1
vote
3
answers
2k
views
How to create a multi-layer JComboBox
I'm creating a simulator using Java Swing. I used JComboBox to display units of utilities such as "KW, KL, KM" etc to measure Power, Water and distance. It's simple to add bunch of items to a ...
0
votes
1
answer
564
views
Multi-level Inheritance Default Constructor
The parent class is...
public class UMember {
private String first;
private String last;
private String street;
private String city;
private String state;
private String ...
1
vote
1
answer
557
views
ClassCastException in Android ScrollView
There is a class in my project (B) which extends (not directly) ScrollView (A) which can be used to set a value in the month field scroll which is vertical
Here is the inheritance heirarchy:
B ...