Changeset 176:2fe25a2d23f4 in finroc_plugins_data_types-java


Ignore:
Timestamp:
08.01.2020 16:20:41 (2 weeks ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
default
Phase:
public
Tags:
tip
Message:

Adds toString() method to additional data types (the same as e.g. in pose and angle types). In particular, this is required for using these types in some fingui widgets. Thanks to Patrick Fleischmann for the suggestion.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Time.java

    r171 r176  
    2727import org.rrlib.serialization.BinaryOutputStream; 
    2828import org.rrlib.serialization.BinarySerializable; 
     29import org.rrlib.serialization.Serialization; 
    2930import org.rrlib.serialization.StringInputStream; 
    3031import org.rrlib.serialization.StringOutputStream; 
     
    8788 
    8889    @Override 
     90    public String toString() { 
     91        return Serialization.serialize(this); 
     92    } 
     93 
     94    @Override 
    8995    public void copyFrom(Time o) { 
    9096        sec = o.sec; 
  • vector/Vector.java

    r175 r176  
    2727import org.rrlib.serialization.BinaryOutputStream; 
    2828import org.rrlib.serialization.BinarySerializable; 
     29import org.rrlib.serialization.Serialization; 
    2930import org.rrlib.serialization.StringInputStream; 
    3031import org.rrlib.serialization.StringOutputStream; 
     
    172173    } 
    173174 
     175    @Override 
     176    public String toString() { 
     177        return Serialization.serialize(this); 
     178    } 
     179 
    174180    public int componentCount() { 
    175181        return components; 
Note: See TracChangeset for help on using the changeset viewer.