English 中文(简体)
JAXB Force Ordering of Sets
原标题:JAXB force ordering of Sets

I m 具有一套类型的物体。 执行工作没有受到干扰,因此,由此产生的XML分子的次序是任意的,而且,我每次打着不同的顺序。

是否有办法告诉马沙勒如何在拆解过程中对实地内容进行分类?

问题回答

您可使用<代码>SortedSet。 1. 如果您开始对<代码>进行审查, 之后,日本宇宙航空研究开发机构将利用这一执行,而不是建立新的执行机制:

package forum7686859;

import java.util.Set;
import java.util.TreeSet;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Root {

    //private Set<String> children = new HashSet<String>();
    private Set<String> children = new TreeSet<String>();

    public Set<String> getChildren() {
        return children;
    }

    public void setChildren(Set<String> children) {
        this.children = children;
    }

}




相关问题
Marshal struct with array member in C#

I m using C# with P/Invoke to access to a DLL method. The definition of the method is the following: [DllImport("userManager.dll")] static extern int GetUsers(out IntPtr userList); Original structs: ...

Are double* and double** blittable types? C#

I have a question regarding marshalling of C++ arrays to C#. Does the double* automatically convert to double[]? I know double is a blittable type, so double from C++ is the same as double from C#. ...

How do I unmarshal a ruby object in java?

I have a an object that I d like to grab the contents of in java. The only problem is that is is currently in ruby. irb(main):050:0> blah => "...

Marshalling an array of structures from C++ to C#?

In my C# code I m trying to fetch an array of structures from a legacy C++ DLL (the code I cannot change). In that C++ code, the structure is defined like this: struct MyStruct { char* id; ...

Copy bytes in memory to an Array in VB.NET

unfortunately I cannot resort to C# in my current project, so I ll have to solve this without the unsafe keyword. I ve got a bitmap, and I need to access the pixels and channel values directly. I d ...

热门标签